#K34992. Taco: Find Sum Pair

    ID: 25432 Type: Default 1000ms 256MiB

Taco: Find Sum Pair

Taco: Find Sum Pair

You are given n participants with their scores and a target score t. Your task is to determine whether there exists a pair of distinct scores such that their sum equals the target score.

The problem can be formally stated as follows:

Given a list of integers \(a_1, a_2, \dots, a_n\) and an integer \(t\), determine if there exist two indices \(i\) and \(j\) (with \(i \neq j\)) such that \(a_i + a_j = t\). If such a pair exists, output YES; otherwise, output NO.

Note that the list may contain negative numbers and zeros. This challenge tests your ability to use efficient data structures to check for pair sums.

inputFormat

The first line of input contains two integers n and t, where n is the number of participants and t is the target score.

The second line contains n space-separated integers representing the scores of the participants.

outputFormat

Output a single line: YES if there exists a pair of scores that sum up to t, or NO otherwise.

## sample
5 9
1 2 3 4 5
YES