from itertools import accumulate from bisect import bisect_left N, M = map(int, input().split()) yes = False a = [0] * N for i in range(M): b = [a[i] + int(x) for i, x in enumerate(input().split())] c = list(accumulate(b)) l = r = 0 while True: x = 777 + (0 if l == 0 else c[l-1]) r = bisect_left(c, x, r) if r == N: break if c[r] == x: yes = True break l += 1 r = max(l, r) if yes: break a = b print('YES' if yes else 'NO')