Thirty-five years ago, a group of super heroes came together to form the Justice League, whose purpose was to protect planet Earth from villains. After all those years helping mankind, its members are retiring, and now it is time to choose the new members of the Justice League.
To keep their identities secret, super heroes identify themselves with an integer. There are $H$ super heroes on Earth, numbered from $1$ to $H$. If two super heroes have already worked together on a mission, we say the two heroes have a relationship.
There must be exactly one Justice League in the world, and it may be formed by any number of super heroes (even a single one). It must satisfy both of the following conditions.
In other words, you must decide whether the whole set of heroes can be partitioned into a League in which everyone is pairwise related, and a remaining set in which no one is related to anyone else.
Given the heroes and their relationships, determine whether it is possible to form the Justice League under the conditions above.
The input consists of several test cases. The first line of each test case contains two integers separated by a single space, $H$ ($2 \le H \le 5 \times 10^4$) and $R$ ($1 \le R \le 10^5$), indicating the number of heroes and the number of relationships, respectively.
Each of the following $R$ lines contains two integers separated by a single space, $A$ and $B$ ($1 \le A < B \le H$), indicating that hero $A$ has a relationship with hero $B$. Relationships are undirected, so if $A$ has a relationship with $B$, then $B$ also has a relationship with $A$. A relationship is never given twice within a test case.
The end of the input is indicated by a line with $H = R = 0$. The input is read from standard input.
For each test case, print a single line containing the uppercase letter Y if it is possible to form the Justice League under the given conditions, or the uppercase letter N otherwise. The output is written to standard output.