|
|||||||||||||||||||
|
SPOJ time: 2012-02-09 01:57:47 |
Poppy seedProblem code: HS09POP
A kingdom far, far away is ruled by a king who has a beautiful daughter. Many knights would like to marry her, but the wise father has to test their abilities first. His court shaman has invented a puzzle, which he puts before each candidate for the princess' hand in marriage. Here it is:
The shaman now asks the knight if this is possible? One knight is deeply in love with the princess and hence asks you for help with the riddle. InputStandard input contains K (1 ≤ K ≤ 10 000) lines, each containing two values N, A (4 ≤ N ≤ 30 000, 200 ≤ A ≤ 10200) separated by spaces. In line K+1 there are two zeros separated by spaces. Do not process this test case. OutputWrite K lines of output. In each line, print the word 'Yes', if the situation described by the shaman possible for the data in the corresponding line of input or the word 'No' in the opposite case. ExampleInput: ScoringBy solving this problem you will score 10 points.
|
||||||||||||||||||
| |||||||||||||||||||