HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Problems from everywhere > problem:


VologdaInterCity-A. 50614 - Numbers game

Guest
• Discussion of problem (1)

Volume problems

• TopCoder-1. 50761 - Magic Words
• TopCoder-2. 50246 - Making Potions
• TopCoder-3. 50245 - Santa Gifts
• TopCoder-4. 50701 - Cell Removal
• TopCoder-5. 50760 - Hexatridecimal...
• TopCoder-6. 50759 - Text Statistics
• TopCoder-7. 50244 - Chessboard P...
• TopCoder-8. 50641 - Strong Prime ...
• VologdaInterCity-A. 50614 - Nu...
• VologdaInterCity-B. 50632 - Again ...
• VologdaInterCity-C. 50646 - The m...
• VologdaInterCity-D. 50605 - Behind...
• VologdaInterCity-E. 50624 - Simple ...
• VologdaInterUni-A. 50628 - Matrix
• VologdaInterUni-B. 50541 - Binary t...
• VologdaInterUni-C. 50629 - Minuses
• VologdaInterUni-D. 50610 - Feasibility

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