Gnat is celebrating! For the occasion, he received a chocolate bar measuring n \times n squares. During the festivities, he left the chocolate bar on the table and forgot about it. When he returned, he discovered something terrible: the chocolate bar was broken! Not only that, but some squares might have been eaten. Help Gnat determine if someone ate part of his chocolate bar.
The broken chocolate bar is divided into two halves: the left half and the right half. The left half aligns with the left edge, and the right half aligns with the right edge. Each half has rows. In the -th row of the left half, there are l_i squares, and in the right half, there are r_i squares. Gnat suspects that no one ate the chocolate bar if the left and right halves can be combined to form a complete n \times n chocolate bar without lifting or flipping them.
The picture illustrates the chocolate bars from the first two queries in the example.

The input consists of several queries. The first line contains the number (1 \leq t \leq 100) — the number of queries.
Each query is provided on a separate line in the following format: first, the number (2 \leq n \leq 100) — the size of the chocolate bar, followed by pairs of numbers: l_1\ r_1, l_2\ r_2, , l_n\ r_n (1 \leq l_i, r_i < n, l_i + r_i \leq n), where all numbers are integers.
For each query, output "yes" on a separate line if someone ate part of the chocolate bar, or "no" if no squares were eaten.
Exemple 1