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.
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.
Print "Yes" if it is possible to choose a subset of problems that covers all $$$M$$$ tags. Otherwise, print "No".
4 41 0 0 00 1 0 00 0 1 00 0 0 1
Yes
3 41 0 0 00 1 0 00 0 1 0
No
3 20 00 11 1
Yes
3 30 1 01 1 10 1 0
Yes
| Name |
|---|


