Checking for an undirected graph#2470

Checking for an undirected graph

1 second
128 megabytes
Very easy

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.

Input

The first line contains the integer (1 \leq n \leq 100). Each of the next lines contains numbers, describing the adjacency matrix.

Output

Print YES if the graph is simple undirected, and NO otherwise.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading