#include using namespace std; int main() { int N, M; cin >> N >> M; vector X(M); for(int i = 0; i < M; i++) { cin >> X[i]; } vector> C(N, vector(M + 1)); vector T(N); for(int i = 0; i < N; i++) { for(int j = 0; j < M; j++) { cin >> C[i][j]; } cin >> T[i]; C[i][M] = T[i]; } // M個組をsetで管理 map, int> mp; for(int i = 0; i < N; i++) { vector v(M); for(int j = 0; j < M; j++) { v[j] = C[i][j] * T[i]; } if(!mp.count(v)) mp[v] = 0; mp[v]++; } for(int i = 0; i < N; i++) { vector v(M); for(int j = 0; j < M; j++) { v[j] = C[i][j] * T[i]; } vector target(M); bool ok = true; for(int j = 0; j < M; j++) { target[j] = (10000 * X[j] - 100 * T[i] * C[i][j]) / (100 - T[i]); if((10000 * X[j] - 100 * T[i] * C[i][j]) % (100 - T[i])) ok = false; } if(!ok) continue; if(!mp.count(target)) continue; if(mp[target] > 1 || v != target) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }