func_code_string: #include <bits/stdc++.h>   using namespace std;   void DBG() {     cerr <<  ]           <<   n ;   }   template <class H, class... T>   void DBG(H h, T... t) {     cerr << h;     if (sizeof...(t)) cerr <<  ,  ;     DBG(t...);   }   template <class H>   void DBG(vector<H> v) {     for (int i = 0; i < (int)v.size(); i++) {       cerr << v[i];       if (i != (int)v.size() - 1) cerr <<  ,  ;     }     cerr <<  ]  <<   n ;   }   long long randNum(long long a, long long b) { return a + rand() % (b - a + 1); }   long long mPow(long long b, long long p, long long m) {     b %= m;     long long result = 1;     while (p > 0) {       if (p & 1) result = (result * b) % m;       b = (b * b) % m;       p >>= 1;     }     return result;   }   long long gcdExtended(long long a, long long b, long long *x, long long *y) {     if (a == 0) {       *x = 0, *y = 1;       return b;     }     long long x1, y1;     long long gcd = gcdExtended(b % a, a, &x1, &y1);     *x = y1 - (b / a) * x1;     *y = x1;     return gcd;   }   long long modInverse(long long b, long long m) {     long long x, y;     long long g = gcdExtended(b, m, &x, &y);     if (g != 1) return -1;     return (x % m + m) % m;   }   long long modDivide(long long a, long long b, long long m) {     a = a % m;     long long inv = modInverse(b, m);     if (inv == -1)       return -1;     else       return (inv * a) % m;   }   unsigned long long nCrModPFermat(unsigned long long n, int r, int p) {     if (n < (unsigned long long)r) return 0;     if (r == 0) return 1;     unsigned long long fac[n + 1];     fac[0] = 1;     for (unsigned long long i = 1; i <= n; i++) fac[i] = (fac[i - 1] * i) % p;     return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %            p;   }   bool sortfunc(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }   long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }   long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }   const int dx4[4] = {-1, 0, 1, 0}, dy4[4] = {0, -1, 0, 1};   const int dx8[8] = {-1, -1, -1, 0, 0, 1, 1, 1},             dy8[8] = {0, 1, -1, -1, 1, 0, 1, -1};   void solve() {     vector<string> s;     int n, m;     cin >> n >> m;     string temp;     vector<int> cnt(m, 0);     for (int i = 0; i < n; i++) {       cin >> temp;       for (int j = 0; j < m; j++) {         if (temp[j] ==  1 ) {           cnt[j]++;         }       }       s.push_back(temp);     }     for (int i = 0; i < n; i++) {       bool flag = true;       for (int j = 0; j < m; j++) {         if (s[i][j] ==  0  and cnt[j] == 0) {           flag = false;           break;         }         if (s[i][j] ==  1  and cnt[j] - 1 == 0) {           flag = false;           break;         }       }       if (flag) {         cout <<  YES               <<   n ;         return;       }     }     cout <<  NO           <<   n ;   }   signed main() {     ios::sync_with_stdio(false);     cout.tie(NULL);     cin.tie(NULL);     solve();     return 0;   }   