#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> a(n, vector(m + 1)); for (int i = 0; i < n; i++) for (int j = 0; j <= m; j++) cin >> a[i][j]; map, int> mp; for (int i = 0; i < n; i++) { vector list(m); for (int j = 0; j < m; j++) list[j] = a[i][j] * a[i][m]; if (mp.find(list) == mp.end()) mp[list] = i; else mp[list] = -1; } for (int i = 0; i < n; i++) { if (a[i][m] == 100) { vector check = a[i]; check.pop_back(); if (check == x) { cout << "Yes" << endl; return 0; } continue; } bool flg = true; vector predict; for (int j = 0; j < m; j++) { int k = x[j] * 10000 - 100 * a[i][m] * a[i][j]; if (k % (100 - a[i][m]) != 0) { flg = false; break; } predict.push_back(k / (100 - a[i][m])); } if (flg && mp.find(predict) != mp.end() && mp[predict] != i) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; }