#K45282. Taco Response Checker
Taco Response Checker
Taco Response Checker
In this problem, you are given a number of responses from participants in a contest. Each response contains an identifier (a string) and the time taken (in minutes). You are also provided with a time threshold (T). Your task is to determine if there is at least one response with a response time strictly less than (T). If such a response exists, print "YES"; otherwise, print "NO".
Note: The inequality to check is (time < T). A participant identifier may appear more than once, and each individual response should be checked separately.
inputFormat
The input is read from standard input (stdin). The first line contains two integers (n) and (T), where (n) is the number of responses and (T) is the threshold value. Each of the following (n) lines contains a participant identifier (a non-empty string without spaces) and an integer representing the response time in minutes, separated by space.
outputFormat
Output a single line to standard output (stdout) containing either "YES" if at least one response has a response time less than (T), or "NO" otherwise.## sample
5 25
id1 50
id2 30
id1 20
id3 40
id2 35
YES