Combination lock
Agent Johnny English needs to open a safe in order to steal secret information about the impending conspiracy against the Queen of Britain.
The combination lock to the safe is a table of n rows and m columns. The lock can be broken if all numbers in each column of the table are different.
Johnny is not good at the art of hacking, so his capabilities are limited only by the fact that he can reverse any row of the table, but no more than once each.
However, time is short, and safe may never be opened using such primitive methods. Therefore, English must know in advance whether he can open the safe or whether he should not embark on this adventure. Help Johnny find out which lines to reverse to open the safe.
Input
The first line contains two integers n and m (1 ≤ n, m ≤ 10^3
) - the number of rows and columns of the code lock table.
Each of the next n lines contains m integers - a description of the code lock table. All numbers in the table are in the range from 1 to 10^9
.
Output
On the first line print No if Johnny cannot hack the lock.
Otherwise, print Yes, and the second line print the number of lines that Johnny should reverse. On the third line print, in any order, the line numbers that need to be rotated to open the lock, separated by spaces.
If there are multiple solutions, it is allowed to print any of them.