Problem2331--Takahashi's Failure

2331: Takahashi's Failure

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

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 1001KN100
  • 1\leq A_i\leq 1001Ai100
  • 1\leq B_i\leq N1BiN
  • 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\ldotsA_NANB_1B1B_2B2\ldotsB_KBK

Output

If Takahashi has a chance to eat a food he dislikes, print Yes; otherwise, print No.

Sample Input Copy

5 3
6 8 10 7 10
2 3 4

Sample Output Copy

Yes

HINT

Among the five foods, the ones with the greatest tastiness are Food 33 and 55, of which he eats one.
He dislikes Food 2233, and 44, one of which he has a chance to eat: Food 33.
Therefore, the answer is Yes.

Source/Category