Competitions

# Two sum

Given a sorted array A in ascending order, having n integers. Find if there exists any pair of elements (Ai, Aj), i < j, such that their sum is equal to x.

#### Input

The first line contains two integers n (n105) and x (x106). Second line contains n nonnegative integers, each no more than 106.

#### Output

Print "YES" if such pair of elements exists, and "NO" otherwise.

Time limit 1 second
Memory limit 128 MiB
Input example #1
10 13
1 3 5 6 8 10 11 11 11 16

Output example #1
YES

Input example #2
8 61
5 5 8 12 16 21 44 50

Output example #2
NO

Author Michael Medvediev