A directed graph is given. Determine whether it contains a cycle.
The first line contains a single integer — the number of vertices n~(n \le 50).
Then follow lines, each containing integers — the adjacency matrix of the graph. Each number is either or . The -th number in the -th line is equal to if and only if there is an edge from vertex to vertex .
It is guaranteed that the main diagonal of the matrix contains only zeros.
Print if the graph contains no cycles, and if there is at least one cycle.

Example 1
Example 2