Given a square matrix n \times n consisting of zeros and ones, determine whether it can represent the adjacency matrix of a simple undirected graph. Recall that a simple graph does not contain loops or multiple edges.
The first line contains the integer (1 \leq n \leq 100). Each of the next lines contains numbers, describing the adjacency matrix.
Print YES if the graph is simple undirected, and NO otherwise.
Example 1
Example 2