N,M=map(int,input().split()) X=[0]*(N+1) Y=[0]*(N+1) Flag=0 for _ in range(M): A=[0]+list(map(int,input().split())) for i in range(N+1): X[i]+=A[i] for i in range(1,N+1): Y[i]=Y[i-1]+X[i] S=set() for y in Y: if y-777 in S: Flag=1 S.add(y) print("YES" if Flag else "NO")