#K4901. Symmetric Matrix Check
Symmetric Matrix Check
Symmetric Matrix Check
Given a square matrix \( A \) of size \( n \times n \), determine whether it is symmetric. A matrix is symmetric if and only if \( A_{ij} = A_{ji} \) for all \( 1 \leq i, j \leq n \). You are required to read the input from standard input (stdin) and output the result to standard output (stdout).
If the matrix is symmetric, output YES. Otherwise, output NO.
inputFormat
The first line of input contains a single integer \( n \) indicating the size of the square matrix. The following \( n \) lines each contain \( n \) integers separated by spaces, representing the matrix rows.
outputFormat
Output a single line with YES if the matrix is symmetric, and NO otherwise.
## sample3
1 2 3
2 1 4
3 4 1
YES