#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 4000000000000000001 int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n,m; cin>>n>>m; vector x(m); rep(i,m){ cin>>x[i]; x[i] *= 10000; } vector c(n,vector(m)); vector t(n); vector>> S(101); rep(i,n){ rep(j,m)cin>>c[i][j]; cin>>t[i]; S[t[i]].push_back(c[i]); } rep(i,101)sort(S[i].begin(),S[i].end()); rep(i,n){ for(int j=1;j<=100;j++){ vector goal(m,-1); rep(k,m){ long long cur = x[k]; cur += c[i][k] * t[i] * j; cur -= c[i][k] * t[i] * 100; if(cur % (100 * j) != 0)break; cur /= 100 * j; goal[k] = cur; } if(goal[m-1]==-1)continue; if(goal == c[i])continue; if(binary_search(S[j].begin(),S[j].end(),goal)){ cout<<"Yes"<