HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


50614 - Numbers game

Guest
• Discussion of problem (1)

Section problems

• 50590 - Bronze medalists
• 50602 - Birthday Ivanova
• 50603 - Rider
• 50604 - Viruses
• 50605 - Behind Bars
• 50608 - Gangsters
• 50610 - Feasibility
• 50612 - Fun game
• 50614 - Numbers game
• 50615 - Moneybox
• 50617 - KBH
• 50618 - Code Correction
• 50619 - The Mars Rover
• 50620 - Poker
• 50621 - Postal Figures
• 50622 - Sequence
• 50623 - Rectangles

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Difficulty Alpha

Numbers game

Russian
Bob likes to play with numbers. For this game he hass a deck of N different integers from 1 to N. Edward (who is also very fond of this game) has just got a new deck. Bob says that the deck lacks exactly two numbers. Knowing that N (number of elements that must be in the deck) and S (the amount of available numbers), determine whether Bob was right, and if not wrong, ask, what is lacking in numbers.

The first line of input contains two integers: N (3 ≤ N ≤ 10) and S (from zero to the sum of the numbers of full deck). If you can identify exactly two numbers, write in the first line write "yes". The second line shows the possible numbers - two numbers separated by a space. If John was wrong, show only a line "no".
Sample Input I Sample Input II
6 13
6 13
Sample Output I Sample Output II
yes
3 5
yes
2 6

Для отправки решений необходимо выполнить вход.

www.contester.ru