CSES - Aalto Competitive Programming 2024 - wk11 - Wed - Super knight
  • 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 aa of nn 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)(x, y) will be of the form (x±u,y±v)(x \pm u, y \pm v), where u,vau, 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)(x, y) in an infinitely large board after a finite number of moves when the knight initially stands at (0,0)(0, 0).

Input

First line contains three integers n,xn, \,x and yy. The second line contains nn integers a1,a2,,ana_1,\,a_2,\dots,\,a_n.

Output

Print "Yes" if the knight can capture the pawn and otherwise "No".

Constraints

  • 1n1051 \leq n \leq 10^5
  • 1x,y1091 \leq x, y \leq 10^9
  • 1ai1091 \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