Caravans arrive at the coral atoll of Pearldeep with crates of ledgers, and Rowena the customs officer must account for every last one. Task: Print YES if two distinct elements sum to exactly k, otherwise NO. Input format: First line: n and k. Second line: n integers. Output format: Print YES or NO. Constraints: 2 <= n <= 10445; 0 <= a[i],k <= 1000.
Example 1:
Example 2:
Example 3:
Constraints:
2 <= n <= 10445; 0 <= a[i],k <= 1000.
