Qualification Rounds

题意翻译

### # 题目描述 ## 斯纳克和菲利普正在为即将到来的半决赛预赛做准备。他们有一个含有N个问题的银行,他们想选择任何非空子集作为问题集。 有K个经验丰富的球队正在参加比赛。这些团队中的一些已经知道了一些问题。为了让比赛变得有趣,每个球队都应该知道不超过一半的问题。 确定斯纳克和菲利普是否能做出有趣的问题集! ### 输入格式: 第一行包含两个整数n,k ( 1<=n<=10^5,1<=k<=4 ) 分别表示问题的数量和有经验的队伍的数量。 ### 输出格式: 每一个N行包含k个整数,每个整数等于0或1。 如果第j个队伍知道第i个问题,则第i行的第j个数是1。反之,则为0. 如果有可能做一个有趣的问题集,则输出“YSE”,反之则输出“NO”.你可以改变每个字符的大小写(“yeS”和“yes”是有效的,当答案是“YES”时)。 ### 说明 在第一个例子中,你不能制造任何有趣的问题,因为第一个团队知道所有的问题。 在第二个例子中,你可以选择第一个和第三个问题。

题目描述

Snark and Philip are preparing the problemset for the upcoming pre-qualification round for semi-quarter-finals. They have a bank of $ n $ problems, and they want to select any non-empty subset of it as a problemset. $ k $ experienced teams are participating in the contest. Some of these teams already know some of the problems. To make the contest interesting for them, each of the teams should know at most half of the selected problems. Determine if Snark and Philip can make an interesting problemset!

输入输出格式

输入格式


The first line contains two integers $ n $ , $ k $ ( $ 1<=n<=10^{5} $ , $ 1<=k<=4 $ ) — the number of problems and the number of experienced teams. Each of the next $ n $ lines contains $ k $ integers, each equal to $ 0 $ or $ 1 $ . The $ j $ -th number in the $ i $ -th line is $ 1 $ if $ j $ -th team knows $ i $ -th problem and $ 0 $ otherwise.

输出格式


Print "YES" (quotes for clarity), if it is possible to make an interesting problemset, and "NO" otherwise. You can print each character either upper- or lowercase ("YeS" and "yes" are valid when the answer is "YES").

输入输出样例

输入样例 #1

5 3
1 0 1
1 1 0
1 0 0
1 0 0
1 0 0

输出样例 #1

NO

输入样例 #2

3 2
1 0
1 1
0 1

输出样例 #2

YES

说明

In the first example you can't make any interesting problemset, because the first team knows all problems. In the second example you can choose the first and the third problems.