![](https://dmoj.algome.me/data/peths/tle17c6p2.png)
Your friend is somehow amazingly consistent at getting more than a perfect score on assignments and exams.
Your professor is handing back some recent papers. You decided to be nice and pick up your friend's papers.
The format of every paper's header is x/n name
where x
and n
are positive integers and name
is a string. x
is the score of the paper and n
is the total score possible.
There are 55/50 nath
and 33/
are possible covered headers.
Given your friend's name and knowing that he must have papers where
Input Specification
The first line of input will contain
The second line of input will contain a string containing no more than
The next x/n name
, but the right ending characters might be cut off. It is guaranteed that
Output Specification
On a separate line for each paper, output Y
if there is any possibility that the paper could be your friend's, or N
if it cannot.
Sample Input
5
morethanperfect
11/10 adam
12/5 morethanper
8/8 morethan
10/3
20
Sample Output
N
Y
N
Y
Y
Comments