The Queen of Nlogonia is a fan of mazes, so the queendom's architects built several mazes around the Queen's palace. Every maze is made of rooms connected by corridors. Each corridor connects a different pair of distinct rooms and can be traversed in both directions.
The Queen loves to stroll through a maze's rooms and corridors in the late afternoon. Her servants choose a different challenge every day: finding a simple path from a start room to an end room in a maze. A simple path is a sequence of distinct rooms such that each pair of consecutive rooms in the sequence is connected by a corridor. The first room of the sequence must be the start room, and the last room must be the end room. The Queen thinks a challenge is good when, among the routes from the start room to the end room, exactly one of them is a simple path. Can you help the Queen's servants choose a challenge that pleases the Queen?
To do so, write a program that, given the description of a maze and a list of queries defining start and end rooms, determines for each query whether that choice of rooms is a good challenge or not.
The input consists of several test cases. The first line of each test case contains three integers $R$, $C$, and $Q$, representing respectively the number of rooms in a maze ($2 \le R \le 10^4$), the number of corridors ($1 \le C \le 10^5$), and the number of queries ($1 \le Q \le 1000$). Rooms are identified by distinct integers from $1$ to $R$. Each of the next $C$ lines describes a corridor with two distinct integers $A$ and $B$, indicating a corridor connecting rooms $A$ and $B$ ($1 \le A < B \le R$). Each of the following $Q$ lines describes a query with two distinct integers $S$ and $T$, indicating the start and end rooms of a challenge ($1 \le S < T \le R$). Within each test case there is at most one corridor connecting each pair of rooms, and no two queries are the same.
The last test case is followed by a line containing three zeros.
For each test case output $Q + 1$ lines. In the $i$-th line write the answer to the $i$-th query. If the rooms make a good challenge, write the uppercase character Y. Otherwise write the uppercase character N. After each test case, print a line containing a single hyphen character (-).