Given an integer number k and n numbers x_{1}, … x_{n},
are there at least two equal numbers at distance at most k?
Consider the sequence of x_{i}’s circularly,
that is, assume that x_{1} is to the right of x_{n}.

Input

Input consists of several cases,
each with k and n,
followed by x_{1}, … x_{n}.
You can assume 1 ≤ k ≤ n/2, 2 ≤ n ≤ 10^{5},
and that each x_{i} is an integer number between 0 and 10^{9}.

Output

For every case, print “yes” if there is at least a pair of x_{i}’s
with the required condition,
and print “no” otherwise.

Public test cases

**Input**

4 8 10 42 23 33 12 42 17 18 3 8 10 42 23 33 12 42 17 18 4 7 10 42 23 33 12 42 17 3 7 10 42 23 33 12 42 17

**Output**

yes no yes yes

Information

- Author
- Javier Nistal
- Language
- English
- Official solutions
- C++
- User solutions
- C++