Negative Weight Cycle
Given an approximate graph, your task is to determine if it contains a negative weight cycle. If such a cycle exists, you should output it.
Input
The first line of the input file contains the integer N (1 ≤ N ≤ 100), representing the number of vertices in the graph. The following N lines each contain N integers, forming the adjacency matrix of the graph. The weights of the edges do not exceed 10000 in absolute value. If there is no edge between two vertices, the corresponding entry in the matrix is 100000.
Output
On the first line of the output file, print "YES" if a negative weight cycle exists, or "NO" if it does not. If a cycle is found, print on the second line the number of vertices in the cycle, and on the third line, list the vertices that form this cycle in the order they are traversed.