A single attendee has n seminars on their wish list. Seminar i runs during the half-open interval [s, e) with s < e. The attendee can go to every seminar only if no two of them overlap in time; a seminar that ends exactly when another begins does NOT overlap it (touching at an endpoint is fine).
Decide whether all n seminars can be attended.
Input format
Line 1: an integer n.
Next n lines: two integers s and e describing one seminar's half-open interval [s, e).
Output format
Print YES if all seminars can be attended (no two overlap), otherwise print NO.
Constraints
- 1 ≤ n ≤ 100000
- 0 ≤ s < e ≤ 1000000000