#include <bits/stdc++.h>   using namespace std;   int n, m, f[2001] = {0};   bool p, a[2001][2001];   string st;   int main() {     cin >> n >> m;     for (int i = 1; i <= n; i++) {       cin >> st;       for (int j = 0; j < m; j++)         if (st[j] ==  1 ) {           a[i][j + 1] = true;           f[j + 1]++;         } else           a[i][j + 1] = false;     }     for (int i = 1; i <= n; i++) {       p = true;       for (int j = 1; j <= m; j++)         if (f[j] == 1 && a[i][j] == 1) p = false;       if (p) {         cout <<  YES ;         return 0;       }     }     cout <<  NO ;   }   