The street network of a city consists of streets and nodes. Two or more streets may meet at a node. Every street is one-way. Two nodes may also be connected directly by more than one street, and a node may have a street that loops back to itself (a self-loop).
Write a program that answers the following three questions.
The first line contains a positive integer $N$ ($N \le 50$), the number of nodes.
The second line contains a positive integer $S$ ($S \le 3$), the path length.
The next $N$ lines describe the network as a matrix. The value in row $I$, column $J$ is the number of streets going from node $I$ to node $J$. Nodes are numbered from $1$ to $N$.
On the first line, print the string YES if there exists a route that starts at some node and traverses every street exactly once; otherwise print the string NO.
Only when the answer is YES, print the following two additional lines.
When the answer is NO, print only NO on the first line.