#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n,m; cin>>n>>m; vector<ll> X(m); rep(i,m) cin>>X[i]; vector<vector<ll>> C(n,vector<ll>(m)); vector<ll> T(n); rep(i,n){ rep(j,m) cin>>C[i][j]; cin>>T[i]; } rep(i,m) X[i]*=100; rep(i,n) rep(j,m) C[i][j]*=T[i]; map<vector<ll>,ll> mp; rep(i,n) mp[C[i]]++; rep(i,n){ if(T[i]==100){ if(C[i]==X){ cout<<"Yes"<<endl; return 0; } continue; } vector<ll> Y(m); bool b=true; rep(j,m){ if((100*(X[j]-C[i][j]))%(100-T[i])!=0){ b=false; break; } Y[j]=(100*(X[j]-C[i][j]))/(100-T[i]); } if(b){ if(mp[Y]>=2){ cout<<"Yes"<<endl; return 0; } if(mp[Y]==1 && Y!=C[i]){ cout<<"Yes"<<endl; return 0; } } } cout<<"No"<<endl; return 0; }