n, m = map(int, input().split()) a = [list(map(int, input().split())) for _ in range(m)] nums = [[0] * n for _ in range(m)] nums[0] = a[0] for i in range(1, m): for j in range(n): nums[i][j] = nums[i - 1][j] + a[i][j] for i in range(m): for j in range(n - 1): nums[i][j + 1] += nums[i][j] for i in range(m): seen = {0} for j in range(n): if nums[i][j] - 777 in seen: print("YES") exit() seen.add(nums[i][j]) print("NO")