LearnPy Hub
← Arena
IntermediateRating 1200

Pair With Sum

Is there a pair of elements at two different positions whose sum equals k? Print YES or NO.

Input

First line n and k, second line n integers.

Output

YES or NO.

Sample 1

Input
5 9
2 7 11 15 1
Output
YES

Sample 2

Input
4 10
1 2 3 4
Output
NO
solution.py
Output appears here
Pair With Sum · Python Arena problem · LearnPy Hub