#ABC296C. [ABC296C] Gap Existence

[ABC296C] Gap Existence

提示:该题测试数据补录中,暂不支持评测提交。

No testdata at current.

No submission language available for this problem.

Score : 300300 points

Problem Statement

You are given a sequence of NN numbers: A=(A1,…,AN)A=(A_1,\ldots,A_N).

Determine whether there is a pair (i,j)(i,j) with 1≤i,j≤N1\leq i,j \leq N such that Ai−Aj=XA_i-A_j=X.

Constraints

  • 2≤N≤2×1052 \leq N \leq 2\times 10^5
  • −109≤Ai≤109-10^9 \leq A_i \leq 10^9
  • −109≤X≤109-10^9 \leq X \leq 10^9
  • All values in the input are integers.

Input

The input is given from Standard Input in the following format:

NN XX

A1A_1 …\ldots ANA_N

Output

Print Yes if there is a pair (i,j)(i,j) with 1≤i,j≤N1\leq i,j \leq N such that Ai−Aj=XA_i-A_j=X, and No otherwise.

6 5
3 1 4 1 5 9
Yes

We have A6−A3=9−4=5A_6-A_3=9-4=5.

6 -4
-2 -7 -1 -8 -2 -8
No

There is no pair (i,j)(i,j) such that Ai−Aj=−4A_i-A_j=-4.

2 0
141421356 17320508
Yes

We have A1−A1=0A_1-A_1=0.