Codeforces Round 263 (Div. 2)
A
Appleman and Easy Task
Codeforces
1000
原题
←B →
翻译中…

Toastman came up with a very easy task. He gives it to Appleman, but Appleman doesn't know how to solve it. Can you help him?

翻译中…

Given a $*n* × *n*$ checkerboard. Each cell of the board has either character 'x', or character 'o'. Is it true that each cell of the board has even number of adjacent cells with 'o'? Two cells of the board are adjacent if they share a side.

翻译中…

Input

翻译中…

The first line contains an integer $*n*$ ($1 ≤ *n* ≤ 100$). Then $*n*$ lines follow containing the description of the checkerboard. Each of them contains $*n*$ characters (either 'x' or 'o') without spaces.

翻译中…

Output

翻译中…

Print "YES" or "NO" (without the quotes) depending on the answer to the problem.

翻译中…

样例

Input #1
3
xxo
xox
oxx
Output #1
YES
InputCopy OutputCopy
Input #2
4
xxxo
xoxo
oxox
xxxx
Output #2
NO
InputCopy OutputCopy
题目信息
题号
462A
时间限制
1 s
内存限制
256 MB
标签
暴力
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。