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<sup class="upper-index">5</sup>, 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.
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.
5 3
1 0 1
1 1 0
1 0 0
1 0 0
1 0 0
NO
3 2
1 0
1 1
0 1
YES
10 2
1 0
1 0
0 0
1 1
0 0
1 1
0 0
1 1
0 1
0 1
YES
10 3
1 0 0
0 1 1
1 0 0
0 1 0
0 0 1
1 0 1
0 1 1
1 0 0
1 1 0
0 0 0
YES
10 4
1 0 1 0
1 0 0 1
1 1 0 1
1 0 1 1
1 1 0 1
1 0 1 0
0 0 0 0
0 0 1 0
1 0 1 0
0 0 1 1
YES
2 2
0 0
1 0
YES
3 3
1 0 1
1 0 0
1 1 1
NO
4 4
0 0 0 0
1 1 0 0
1 1 1 1
1 0 1 1
YES
4 1
1
1
0
0
YES
1 4
0 0 0 0
YES
3 3
0 0 1
0 1 1
1 0 0
YES
2 3
0 0 1
1 0 0
YES
1 1
0
YES
2 4
0 1 1 1
1 0 0 0
YES
2 4
1 0 1 0
0 1 0 1
YES
2 4
1 0 0 0
0 0 0 1
YES
2 3
0 1 0
0 0 1
YES
3 4
1 0 1 0
0 1 0 1
1 1 1 1
YES
3 4
0 0 1 1
1 1 1 0
1 1 0 1
NO
4 4
0 0 0 1
0 0 0 1
0 0 1 0
0 0 1 0
YES
2 4
1 1 0 0
0 0 1 1
YES
2 4
1 0 0 0
0 1 0 0
YES
2 3
1 0 0
0 0 1
YES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ticmethod
    def _read():
        return sys.stdin.readline().strip()

    def read_int(self):
        return int(self._read())

    def read_float(self):
        return float(self._read())

    def read_ints(self):
        return map(int, self._read().split())

    def read_floats(self):
        return map(float, self._read().split())

    def read_ints_minus_one(self):
        return map(lambda x: int(x) - 1, self._read().split())

    def read_list_ints(self):
        return list(map(int, self._read().split()))

    def read_list_floats(self):
        return list(map(float, self._read().split()))

    def read_list_ints_minus_one(self):
        return list(map(lambda x: int(x) - 1, self._read().split()))

    def read_str(self):
        return self._read()

    def read_list_strs(self):
        return self._read().split()

    def read_list_str(self):
        return list(self._read())

    @staticmethod
    def st(x):
        return sys.stdout.write(str(x) + '\n')

    @staticmethod
    def lst(x):
        return sys.stdout.write(" ".join(str(w) for w in x) + '\n')

    @staticmethod
    def round_5(f):
        res = int(f)
        if f - res >= 0.5:
            res += 1
        return res

    @staticmethod
    def max(a, b):
        return a if a > b else b

    @staticmethod
    def min(a, b):
        return a if a < b else b


class Solution:
    def __init__(self):
        return

    @staticmethod
    def main(ac=FastIO()):
        n, k = ac.read_ints()
        dct = set()
        for _ in range(n):
            lst = ac.read_list_ints()
            num = 0
            for x in lst:
                num *= 2
                num += x
            dct.add(num)
        if 0 in dct:
            ac.st("Yes")
            return
        lst = list(dct)
        m = len(lst)
        for i in range(m):
            for j in range(i + 1, m):
                if lst[i] & lst[j] == 0:
                    ac.st("Yes")
                    return
        ac.st("NO")
        return


Solution().main()
