def has_subarray(arr, target):
    prefix_set = {0}
    current_sum = 0
    for num in arr:
        current_sum += num
        if (current_sum - target) in prefix_set:
            return True
        prefix_set.add(current_sum)
    return False

n, m = map(int, input().split())
current_sums = [0] * n

found = False
for _ in range(m):
    a = list(map(int, input().split()))
    for j in range(n):
        current_sums[j] += a[j]
    if has_subarray(current_sums, 777):
        found = True
        break

print("YES" if found else "NO")