atcoder#ABC252B. [ABC252B] Takahashi's Failure
[ABC252B] Takahashi's Failure
Score : points
Problem Statement
Takahashi has foods in his house. The -th food has the tastiness of . He dislikes of these foods: for each , he dislikes the -th food.
Out of the foods with the greatest tastiness among the 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
- All are distinct.
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
If Takahashi has a chance to eat a food he dislikes, print Yes
; otherwise, print No
.
5 3
6 8 10 7 10
2 3 4
Yes
Among the five foods, the ones with the greatest tastiness are Food and , of which he eats one.
He dislikes Food , , and , one of which he has a chance to eat: Food .
Therefore, the answer is Yes
.
5 2
100 100 100 1 1
5 4
No
The foods with the greatest tastiness are Food , , and , none of which he has a chance to eat.
2 1
100 1
2
No
The food with the greatest tastiness is Food , which he has no chance to eat.