- Time limit: 1.00 s
- Memory limit: 512 MB
Maija is playing with chess pieces. She has decided to give the knights super powers! She has written down a list a of n positive integers. Instead of the regular L-pattern, the dimensions of the jump can now be chosen from the list. Formally, a knights position after a move from grid cell (x, y) will be of the form (x \pm u, y \pm v), where u, v \in a.
Now Maija has started to doubt the power of the super knight. She wonders if it can capture a stationary pawn at position (x, y) in an infinitely large board after a finite number of moves when the knight initially stands at (0, 0).
Input
First line contains three integers n, \,x and y. The second line contains n integers a_1,\,a_2,\dots,\,a_n.
Output
Print "Yes" if the knight can capture the pawn and otherwise "No".
Constraints
- 1 \leq n \leq 10^5
- 1 \leq x, y \leq 10^9
- 1 \leq a_i \leq 10^9
Example 1
Input:
3 6 1 8 9 3
Output:
Yes
Example 2
Input:
1 1 2 1
Output:
No
Example 3
Input:
2 1 1 2 4
Output:
No