#include using namespace std; typedef long long ll; typedef unsigned long long ull; // const ll INF = numeric_limits::max() / 4; // const int INF = numeric_limits::max() / 4; // cout << std::fixed << std::setprecision(15); void MakeXORBasis(vector& A, vector& B){ } int main() { int N, M; cin >> N >> M; if(N == 1){ cout << "Yes" << endl; return 0; } vector S(M); for(int i = 0; i < M; i++) cin >> S[i]; int K = (N / 64) + 1; vector X(M, vector(K, 0)); for(int i = 0; i < M; i++){ for(int k = 0; k < K; k++){ for(int b = 0; k * 64 + b < N; b++){ if(S[i][k * 64 + b] == '1') X[i][k] += (1ULL << b); } } } vector > Y; for(int i = 0; i < M; i++){ vector a = X[i]; for(auto it = Y.begin(); it != Y.end(); it++){ vector b = *it; int f = 0; for(int k = 0; k < K; k++){ if(f == -1){ a[k] = a[k]; }else if(f == 1){ a[k] == a[k] ^ b[k]; }else{ if(a[k] < a[k] ^ b[k]){ a[k] = a[k]; f = -1; }else if(a[k] < a[k] ^ b[k]){ a[k] = a[k] ^ b[k]; f = 1; }else{ a[k] = a[k]; } } } } bool f = false; for(int k = 0; k < K; k++) if(a[k] != 0) f = true; if(f) Y.push_back(a); if(N <= Y.size()) break; } if(N <= Y.size()){ cout << "Yes" << endl; }else{ cout << "No" << endl; } return 0; }