Description
Time Limit: 2 sec / Memory Limit: 1024 MB
Score : 200200 points
Problem Statement
Takahashi has NN foods in his house. The ii-th food has the tastiness of A_iAi.
He dislikes KK of these foods: for each i=1,2,\ldots,Ki=1,2,…,K, he dislikes the B_iBi-th food.
Out of the foods with the greatest tastiness among the NN foods, Takahashi will randomly choose one and eat it.
If he has a chance to eat something he dislikes, print Yes; otherwise, print No.
Constraints
-
1\leq K\leq N\leq 1001≤K≤N≤100
-
1\leq A_i\leq 1001≤Ai≤100
-
1\leq B_i\leq N1≤Bi≤N
-
All B_iBi are distinct.
-
All values in input are integers.
Input
Input is given from Standard Input in the following format:
NNKKA_1A1A_2A2\ldots…A_NANB_1B1B_2B2\ldots…B_KBK
Output
If Takahashi has a chance to eat a food he dislikes, print Yes; otherwise, print No.
HINT
Among the five foods, the ones with the greatest tastiness are Food 33 and 55, of which he eats one.
He dislikes Food 22, 33, and 44, one of which he has a chance to eat: Food 33.
Therefore, the answer is Yes.