Loops#4761

Loops

1 Sekunde
128 Megabyte
Sehr leicht

The adjacency matrix of an undirected graph is given. Determine whether it contains loops.

Eingabe

The first line contains the number of vertices n~(1 \le n \le 100). Then given lines with elements in each — the description of adjacency matrix.

Ausgabe

Print "YES" if graph contains loops and "NO" otherwise.

Beispiele

Beispiel 1

Loading
Loading

Beispiel 2

Loading
Loading