An undirected graph without loops or multiple edges is given by an adjacency matrix. Determine whether this graph is a tree.
The first line contains the number of vertices (1 \le n \le 100).
Then, an adjacency matrix of size n \times n is given, where denotes the presence of an edge, and denotes its absence. The matrix is symmetric with respect to the main diagonal.
Print "YES" if the graph is a tree, and "NO" otherwise.

Example 1