#include #include using ll = long long; using ull = unsigned long long; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define REP(i, m, n) for(int i = (int)(m); i < (int)(n); i++) using namespace std; using namespace atcoder; using mint = modint998244353; const int inf = 1000000007; const ll longinf = 1ll << 60; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, m; cin >> n >> m; vector y(m); rep(i, m) { cin >> y[i]; y[i] *= 10000; } vector x(n, vector(m, 0)); vector t(n); map, int> mp; rep(i, n) { rep(j, m) cin >> x[i][j]; cin >> t[i]; rep(j, m) { x[i][j] *= t[i]; } mp[x[i]] += 1; } rep(i, n) { vector target = y; rep(j, m) { target[j] -= 100 * x[i][j]; } if(t[i] == 100) { bool ok = true; rep(j, m) { if(target[j] != 0) ok = false; } if(ok) { cout << "Yes" << endl; return 0; } } else { bool ok = true; rep(j, m) { if(target[j] % (100 - t[i])) { ok = false; break; } else { target[j] /= 100 - t[i]; } } if(ok) { int cnt = mp[target]; if(target == x[i]) --cnt; if(cnt > 0) { cout << "Yes" << endl; return 0; } } } } cout << "No" << endl; return 0; }