L. Leo's Daily Training (2025 version)
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

Leo is now training for the ICPC 2025 Regional Finals. As part of his preparation, he uses the popular site HuronCoder, which contains many problems with different tags.

The site has $$$N$$$ problems numbered from $$$1$$$ to $$$N$$$ and $$$M$$$ tags numbered from $$$1$$$ to $$$M$$$. Each problem can be tagged with any subset of tags (including the empty subset or the full set of tags).

Leo wonders if it is possible to pick a subset of problems so that, when combined, they cover all tags.

Input

The first line contains two integers $$$N, M$$$ ($$$1 \le N \le 20$$$ and $$$1 \le M \le 20$$$) — the number of problems and the number of tags.

Each of the next $$$N$$$ lines contains $$$M$$$ integers, where the $$$j$$$-th integer is $$$1$$$ if the problem has tag $$$j$$$, and $$$0$$$ otherwise.

Output

Print "Yes" if it is possible to choose a subset of problems that covers all $$$M$$$ tags. Otherwise, print "No".

Examples
Input
4 4
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Output
Yes
Input
3 4
1 0 0 0
0 1 0 0
0 0 1 0
Output
No
Input
3 2
0 0
0 1
1 1
Output
Yes
Input
3 3
0 1 0
1 1 1
0 1 0
Output
Yes