coxld has created a problem and prepared programs to submit to it. Program always runs for milliseconds.
If the time limit is milliseconds, a program times out if and only if its running time exceeds . In particular, a program with does not time out. Ignore all judging outcomes other than whether a program times out.
coxld has specified the desired outcome for each program: program must time out if and must not time out if .
Determine whether it is possible to choose a positive real number so that every program has its specified outcome.
The input is given in the following format:
Print YES if a positive real time limit satisfying all requirements exists, and NO otherwise.
The first line contains the number of programs .
The -th of the next lines contains and , separated by a space. Here, is the running time in milliseconds. A value of requires a timeout, while requires no timeout.
| 3 | 59 | No additional constraints. |