n,m=map(int,input().split()) x=list(map(int,input().split())) for i in range(m): x[i]*=10000 cs=[] ts=[] for i in range(n): q=list(map(int,input().split())) c=q[:m] t=q[m] cs+=[c] ts+=[t] d={tuple(c):i for i,c in enumerate(cs)} for i in range(n): c1=cs[i] t1=ts[i] if t1==100: if c1==x: print("Yes") exit() continue for t2 in range(1,101): c2=[] for j in range(m): if (x[j]-100*t1*c1[j])%((100-t1)*t2)==0: c2+=[(x[j]-100*t1*c1[j])//((100-t1)*t2)] else: break else: c2=tuple(c2) if c1!=c2: if c2 in d: if ts[d[c2]]==t2: print("Yes") exit() print("No")