There is a grid with $N$ rows and $N$ columns. The cell in the $i$-th row from the top ($1 \le i \le N$) and the $j$-th column from the left ($1 \le j \le N$) is denoted as cell $(i, j)$. A character $C_{i,j}$ is written in cell $(i, j)$, where $C_{i,j}$ is either o or x.
Output Yes if there exists a row in which all characters are the same, or a column in which all characters are the same; otherwise, output No.
Constraints
- $1 \le N \le 100$.
- $C_{i,j}$ is either
oorx($1 \le i \le N$, $1 \le j \le N$). - $N$ is an integer.
Input
The input is given in the following format:
N
C_{1,1} C_{1,2} ... C_{1,N}
C_{2,1} C_{2,2} ... C_{2,N}
...
C_{N,1} C_{N,2} ... C_{N,N}Output
Output Yes if there exists a row in which all characters are the same, or a column in which all characters are the same; otherwise, output No.
Do not output anything other than the answer. (Do not output prompt sentences or anything similar.)
Examples
Input 1
3
o x x
o o x
o x o
Output 1
Yes
Note 1
$C_{1,1} =$ o, $C_{2,1} =$ o, $C_{3,1} =$ o, so all characters in the $1$-st column are o. Therefore, output Yes.
Input 2
4
o x x x
x o x x
x x o x
x x x o
Output 2
No
Note 2
- There is no row in which all characters are the same.
- There is no column in which all characters are the same.
Therefore, output No.
Input 3
6
x x o o x x
x o x x o x
o x x x x o
o x x x x o
x o x x o x
x x o o x x
Output 3
No
Note 3
- There is no row in which all characters are the same.
- There is no column in which all characters are the same.
Therefore, output No.
Input 4
10
o x o o o x o x o x
o o x o o x o o o x
x o o x o o o x x x
o o o x o o x o x x
o o o o o o o x o x
x x x x x x x x x x
o o o x o o o o o x
o o o x o o o o o x
o o o x o o x x o x
o x o o o o x o o x
Output 4
Yes
Note 4
In the $10$-th column and the $6$-th row, all characters are the same in each, so output Yes.