eolymp
bolt
Try our new interface for solving problems
Problems

Columns

Columns

Given a table n × n, filled with integers. Peter finds the column good, if it contains number x. For each column find out is it good.

Input

First line contains number x that does not exceed 2 *109 by absolute value. Second line contains number n (1n100). Each of the following n lines contains n integers that do not exceed 2 *109 by absolute value - the numbers in table cells.

Output

For each column print on a separate line YES, if it contains number x, and NO otherwise.

Time limit 1 second
Memory limit 128 MiB
Input example #1
1
2
0 1
0 0
Output example #1
NO
YES
Input example #2
23
3
23 0 23
21 12 23
11 13 23
Output example #2
YES
NO
YES