eolymp
bolt
Try our new interface for solving problems
Problems

Combination lock

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 (1n, m103) - 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 109.

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.

Time limit 2 seconds
Memory limit 128 MiB
Input example #1
3 5
1 2 3 4 5
2 3 5 4 6
9 3 7 8 9
Output example #1
Yes
1
2 
Input example #2
2 5
1 2 3 4 5
6 4 7 2 5
Output example #2
No
Input example #3
4 3
1 2 3
4 5 6
7 8 9
10 11 12
Output example #3
Yes
0
Source 2018 Цикл Интернет-олимпиад для школьников, первая командная олимпиада сезона, 14 октября, Задача F