Sum of two
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Given an array , sorted in ascending order and containing integers. Determine whether there exists a pair of numbers , where , such that their sum is equal to .
Input
The first line contains two integers and . The second line contains non-negative integers, each of which is not greater than .
Output
Print "YES" if such a pair of elements exists, and "NO" otherwise.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 3K
Acceptance rate 32%