#K61832. Pair with Given Sum
Pair with Given Sum
Pair with Given Sum
Given a list of integers and a target sum \(X\), determine whether there exist two distinct integers in the list whose sum equals \(X\). If such a pair exists, output "Yes"; otherwise, output "No". Your solution should read the input from standard input and write the result to standard output.
inputFormat
The input is provided via standard input (stdin). The first integer \(N\) denotes the number of elements in the list, followed by an integer \(X\) representing the target sum. The next \(N\) integers represent the list elements, separated by spaces.
outputFormat
Output a single line to standard output (stdout) that contains either "Yes" if there exists a pair of distinct integers with sum equal to \(X\), or "No" otherwise.
## sample4 5 1 2 3 4
Yes