PROGRAMMING:Andy's game
Andy is a playful child. Not long ago, he finished learning linear algebra. When he saw the lattice of international go, Andy had a whim. If he filled the lattice with 0 and 1, and chose two rows to exchange, or two columns to exchange, could it make the main diagonal of the matrix all be 1? After an afternoon of self entertainment, Andy had a good time, Now Andy needs your help. Can you help Andy judge whether the matrix composed of 0 and 1 is really solvable?
###Input format:
The first line contains an integer T, which represents the number of groups of data. Next, it contains T groups of data. The first line of each group of data is an integer n, which represents the size of the square matrix; Next, n acts as a 0, 1 matrix of n * n.
###Output format:
Contains T rows. For each group of data, if there is a solution, output a line of yes; Otherwise, output a line No( Pay attention to case)
###Input example:
```in
two
two
0 0
0 1
three
0 0 1
0 1 0
1 0 0
```
###Output example:
```out
No
Yes
```
answer:If there is no answer, please comment
###Input format:
The first line contains an integer T, which represents the number of groups of data. Next, it contains T groups of data. The first line of each group of data is an integer n, which represents the size of the square matrix; Next, n acts as a 0, 1 matrix of n * n.
###Output format:
Contains T rows. For each group of data, if there is a solution, output a line of yes; Otherwise, output a line No( Pay attention to case)
###Input example:
```in
two
two
0 0
0 1
three
0 0 1
0 1 0
1 0 0
```
###Output example:
```out
No
Yes
```
answer:If there is no answer, please comment