URI Online Judge | 3117

# Class Dismissed!

By Joice Gomes Brazil

Timelimit: 2

A certain teacher used to ministrate a career development training in a university, but he got really displeased by the amount of students arriving late to his class. He is very rigorous with appointments and he dislikes having his class interrupted by late attendants. To mininize his frustration, he established the following rule:

• For each class will be defined a minimum number of attendants who must be in the room at the scheduled time. If this number is not reached, training will be canceled.

Given the total number of students in the class, the miminum number of attendants and the expected arrival for each of them, determine if the training will happen or not. Consider that if the expected arrival for a student Ai > 0, he is late.

## Input

The first line of input consists of two integers N (1 <= N <= 106) and K (0 <= K <= 106) representing the number of students and the minimum amount of students required to have the class, respectively. The next input line is given by N integers A1, A2, ..., An (-104 <= An <= 104), the time each student will arrive to the class.

## Output

For each test case, your program should produce a single line with the word YES if the training will happen or NO otherwise.

 Input Sample Output Sample 10 1 0 0 0 0 0 0 273 0 0 0 YES 10 1 -3 -2 -9 -11 -20 0 -1 -8 -10 -100 YES 10 8 -4 7 0 3 4 0 1 88 100 390 NO