N, M = map(int, input().split()) X = list(map(int, input().split())) C = [list(map(int, input().split())) for _ in range(N)] for i in range(M): X[i] *= 10**4 C1 = [[-1]*M for _ in range(N)] C2 = [[-1]*M for _ in range(N)] D = dict() T = [] for i in range(N): T.append(C[i].pop()) for j in range(M): C1[i][j] = C[i][j]*T[i]*10**2 C2[i][j] = C[i][j]*T[i] t = tuple(C2[i]) if t in D: D[t] += 1 else: D[t] = 1 for i in range(N): if T[i] == 100: if tuple(C1[i]) == tuple(X): print("Yes") break continue E = [] for j in range(M): E.append((X[j]-C1[i][j])//(100-T[i])) tE = tuple(E) myT = tuple(C2[i]) if tE == myT: if 2 <= D[tE]: print("Yes") break else: if tE in D: print("Yes") break else: print("No")