K. Kirby's Buffet
time limit per test
3 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
5 5
7 11 9 13 5
2 5 12
1 5 1
1 3 3
2 4 11
1 5 4
Output
NO
YES
YES
YES
NO