J. ConnectSquares
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output
Example
Input
3 3
1 0 1
0 0 0
1 1 0
Output
YES
1 2 2 
1 2 0 
1 2 0