from collections import defaultdict n,m=map(int,input().split()) d=defaultdict(list) X=list(map(int,input().split())) C=[] for i in range(n): CiT=list(map(int,input().split())) Ci=CiT[:-1] T=CiT[-1] if T==100: if Ci==X: print("Yes") exit() else: res=[] for j in range(m): if (10000*X[j]-100*T*Ci[j])%(100-T)==0: res.append((10000*X[j]-100*T*Ci[j])//(100-T)) if len(res)==m: d[tuple(res)].append(i) D=[] for j in range(m): D.append(T*Ci[j]) C.append(tuple(D)) for i in range(n): if C[i] in d: for idx in d[C[i]]: if idx!=i: print("Yes") exit() print("No")