n, m = map(int, input().split()) x = list(map(int, input().split())) a = [list(map(int, input().split())) for _ in range(n)] dic = dict() for i in range(n): lis = [] for j in range(m): lis.append(a[i][j] * a[i][-1]) tup = tuple(lis) if tup in dic: dic[tup] = -1 else: dic[tup] = i for i in range(n): if a[i][-1] == 100: if a[i][:-1] == x: print("Yes") exit() else: flg = True predict = [] for j in range(m): k = x[j] * 10000 - 100 * a[i][-1] * a[i][j] if k % (100 - a[i][-1]) != 0: flg = False break predict.append(k // (100 - a[i][-1])) tup = tuple(predict) if flg and tup in dic and dic[tup] != i: print("Yes") exit() print("No")