Given test cases.
Each test case contains a number (1 \leq n \leq 100) — the number of subjects Viktor has to pass. Then lines follow, each containing two numbers and (1 \leq a \leq b \leq 31), which specify the working interval of the corresponding teacher.
The first line contains a single integer — the number of test cases.
Then all tests are described. For each test, the first line contains the number (1 \leq n \leq 100). Then lines follow, each containing two numbers and (1 \leq a \leq b \leq 31) — the working interval of the corresponding teacher.
For each test, print on a separate line YES if it is possible to pass all subjects in one day, or NO if it is impossible.
Example 1