#include using namespace std; //* ATCODER #include using namespace atcoder; typedef modint998244353 mint; //*/ /* BOOST MULTIPRECISION #include using namespace boost::multiprecision; //*/ typedef long long ll; #define rep(i, s, n) for (int i = (int)(s); i < (int)(n); i++) #define rrep(i, s, n) for (int i = (int)(n)-1; i >= (int)(s); i--) template bool chmin(T &a, const T &b) { if (a <= b) return false; a = b; return true; } template bool chmax(T &a, const T &b) { if (a >= b) return false; a = b; return true; } template T max(vector &a){ assert(!a.empty()); T ret = a[0]; for (int i=0; i<(int)a.size(); i++) chmax(ret, a[i]); return ret; } template T min(vector &a){ assert(!a.empty()); T ret = a[0]; for (int i=0; i<(int)a.size(); i++) chmin(ret, a[i]); return ret; } template T sum(vector &a){ T ret = 0; for (int i=0; i<(int)a.size(); i++) ret += a[i]; return ret; } int main(){ int n, m; cin >> n >> m; vector x(m); rep(i,0,m) cin >> x[i]; vector> c(n, vector(m)); vector t(n); rep(i,0,n){ rep(j,0,m) cin >> c[i][j]; cin >> t[i]; } map,vector> mp; rep(i,0,n){ vector dr(m); rep(j,0,m){ dr[j] = t[i] * c[i][j]; } if (mp[dr].size() >= 2) continue; mp[dr].push_back(i); } rep(i,0,n){ if (t[i] == 100){ bool mode = 1; rep(j,0,m){ if (x[j] != c[i][j]) mode = 0; } if (mode){ cout << "Yes\n"; return 0; } }else{ vector tar(m); bool mode = 1; rep(j,0,m){ tar[j] = 10000*x[j] - 100*t[i]*c[i][j]; if (tar[j] % (100-t[i]) != 0){ mode = 0; break; } tar[j] /= 100-t[i]; } if (!mode){ continue; } vector lst = mp[tar]; mode = 0; for (int x: lst){ if (x == i) continue; mode = 1; } if (mode){ cout << "Yes\n"; return 0; } } } cout << "No\n"; }