import sys input = sys.stdin.readline from collections import * import numpy as np N, M = list(map(int, input().split())) A = np.zeros(N, dtype=np.int) for i in range(M): a = list(map(int, input().split())) A += a S = np.cumsum(A) c = Counter() c[777] = 1 for s in S: if c[s]: print('YES') sys.exit() c[777+s] += 1 print('NO')