import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random #sys.setrecursionlimit(10**9) #sys.set_int_max_str_digits(0) n,m = map(int,input().split()) mod = 2**61-1 base = 101 x = list(map(int,input().split())) for i in range(m): x[i] *= 10000 c = [list(map(int,input().split())) for i in range(n)] s = collections.defaultdict(int) for i in range(n): z = 0 for j in range(m): z += (1 * c[i][-1] * c[i][j]) * (pow(base,j,mod)) z %= mod s[z] += 1 for i in range(n): if 100 - c[i][-1] == 0: cnt = 0 for j in range(m): if x[j] == 100 * c[i][j] * c[i][-1]: cnt += 1 else: break if cnt == m: print('Yes') exit() continue z = 0 for j in range(m): z += (1 * c[i][-1] * c[i][j]) * (pow(base,j,mod)) z %= mod s[z] -= 1 y = [] for j in range(m): y.append(x[j] - 100*c[i][-1]*c[i][j]) check = 1 for j in range(m): if y[j] % (100 - c[i][-1]) != 0: check = 0 break else: y[j] //= (100 - c[i][-1]) if check == 0: continue v = 0 for j in range(m): v += y[j] * pow(base,j,mod) v %= mod #print(i,y,s) if s[v] >= 1: exit(print('Yes')) s[z] += 1 print('No')