A. Buying Souvenirs
time limit per test
2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output
Examples
Input
5 9
2 4
1 10
3 7
3 8
10 20
Output
YA
1
2 9
Input
5 1
2 4
2 10
3 7
3 8
10 20
Output
TIDAK