Gift Exchange
문제
JOI Academy has students, numbered from to .
A gift exchange party is planned to be held soon at JOI Academy. Each student has prepared a gift to bring there, and the value of the gift that student (1 ≤ i ≤ N) will bring is . Students are unwilling to receive a gift whose value is too less than that of their own gift. Specifically, student will be dissatisfied if they receive a gift with a value strictly less than . Here, always holds.
However, some of the students may not actually participate in the party. President , the director of JOI Academy, is considering possible groups of students as a group to participate in the gift exchange party, -th (1 ≤ j ≤ Q) of which consists of students .
For some group of two or more students, if it is possible to exchange gifts within the group without anyone receiving their own gift or getting dissatisfied, that group is said to be gift exchangeable. More formally, a group of students (m ≥ 2) is gift exchangeable if and only if there exists a sequence which is a permutation of and satisfies each of the following conditions. Here, (1 ≤ k ≤ m) represents the number of student who gives their gift to student .
- For all (1 ≤ k ≤ m),.
- For all (1 ≤ k ≤ m),A_{q_k} ≥ B_{p_k}.
President K is keen to make the gift exchange party successful, and thus examining whether each of the groups is gift exchangeable or not.
Write a program which, given information of students and groups, determines whether each of the groups is gift exchangeable or not.
입력
Read the following data from the standard input.
출력
Write lines to the standard output. On the -th line (1 ≤ j ≤ Q), output Yes if the -th group is gift exchangeable, and No otherwise.
예제
예제 1
4 3 8 5 7 2 6 1 4 3 3 4 1 3 1 4
Yes No Yes
예제 2
3 5 6 3 1 4 2 1 1 3
Yes
예제 3
5 3 4 6 9 10 1 2 5 7 8 3 1 5 1 2 2 4
No Yes No
예제 4
10 2 5 8 10 12 14 16 17 19 20 1 4 7 6 11 13 9 3 18 15 8 2 9 1 6 2 8 2 4 1 2 1 6 7 10 5 8
No No Yes No No No Yes Yes