def f(xs): used = {0} t = 0 for x in xs: t += x if t - 777 in used: return True used.add(t) return False N, M = map(int, input().split()) AA = [] for _ in range(M): AA.append(list(map(int, input().split()))) xs = [0] * N for A in AA: for i, a in enumerate(A): xs[i] += a if f(xs): print('YES') break else: print('NO')