Database#524

Database

1 second
64 megabytes
Very easy

Peter studies the theory of relational databases. A table in a relational database consists of values arranged in rows and columns.

There exist different normal forms that a database may adhere to. Normal forms are designed to minimize the redundancy of data. For example, a database table for a library might have a row for each book, and columns for the book name, book author, and author's email.

If the same author wrote several books, then this representation is clearly redundant. To formally define this kind of redundancy, Peter has introduced his own normal form. A table is in Peter's Normal Form (PNF) if and only if there is no pair of rows and a pair of columns such that the values in the corresponding columns are the same for both rows.

The above table is clearly not in PNF, since the values for the 2nd and 3rd columns repeat in the 2nd and 3rd rows. However, if we introduce a unique author identifier and split this table into two tables—one containing the book name and author id, and the other containing the book id, author name, and author email—then both resulting tables will be in PNF.

Given a table, determine whether it is in PNF or not.

Input

The first line of the input file contains two integers and (1 \le n \le 10\ 000, 1 \le m \le 10), the number of rows and columns in the table. The following lines contain the table rows. Each row has column values separated by commas. Column values consist of ASCII characters from space (ASCII code 32) to tilde (ASCII code 126), except for comma (ASCII code 44). Values are not empty and have no leading or trailing spaces. Each row contains at most 80 characters (including separating commas).

Output

If the table is in PNF, output a single word YES (without quotes). If the table is not in PNF, output three lines. On the first line, output a single word NO (without quotes). On the second line, output two integers—row numbers r_1 and r_2 (1 \le r_1, r_2 \le n, r_1 \ne r_2). On the third line, output two integers—column numbers c_1 and c_2 (1 \le c_1, c_2 \le m, c_1 \ne c_2), such that the values in columns c_1 and c_2 are the same in rows r_1 and r_2.

Examples

Example 1

Loading
Loading