A and B want to get into a locked research laboratory. The entrance runs a security system that asks one question. The question is written as an integer q with 1≤q≤N, and it must be answered with either yes or no. A correct answer opens the door, and a wrong answer sets off the alarm.
Both of them know that q is always either x or y, where x=y, the correct answer to x is yes, and the correct answer to y is no.
While they were planning, neither could recall the actual values of x and y. So B walks up to the entrance alone and A waits far away. The moment the question appears, A remembers x and y. From that distance A cannot explain anything to B. A can only shout one integer h. Everything B needs has to fit into that single h.
Write a program that plays both parts. In the first run it reads N, x, y and prints the number h that A shouts. In the second run it reads N, q, h and prints the answer B should give.
The two runs are judged separately, so the rule that turns (x,y) into h and the rule that turns (q,h) into an answer are both fixed here.
The subset table. Take every 6-element subset of {1,2,…,12}, write each subset as its elements in increasing order, and sort those sequences lexicographically. There are 924 such subsets. Let S(v) be the v-th subset in this order, counting from 1. The first four are S(1)={1,2,3,4,5,6}, S(2)={1,2,3,4,5,7}, S(3)={1,2,3,4,5,8} and S(4)={1,2,3,4,5,9}, and the last one is S(924)={7,8,9,10,11,12}.
The number A shouts. For a pair (x,y), h is the smallest number that belongs to S(x) and not to S(y). Two different subsets of the same size never contain one another, so such a number always exists.
The answer B gives. For a pair (q,h), the answer is yes if h∈S(q), and no otherwise.
The first line contains a single integer, either 1 or 2.
If it is 1, the program plays A. The second line contains N and T. The i-th of the next T lines contains x and y (1≤x,y≤N, x=y).
If it is 2, the program plays B. The second line contains N and T. The i-th of the next T lines contains q and h (1≤q≤N, 1≤h≤12).
If the program plays A, print T lines. The i-th line holds the number h for test case i, computed by the rule above.
If the program plays B, print T lines. The i-th line holds the answer for test case i, computed by the rule above, written as yes or no.
In every test case 1≤N≤920 and 1≤T≤10000.