#include <bits/stdc++.h>   using namespace std;   int main() {     int n, m;     std::cin >> n >> m;     getchar();     int a[n][m], nums[m];     for (int i = 0; i < m; i++) {       nums[i] = 0;     }     for (int i = 0; i < n; i++) {       for (int j = 0; j < m; j++) {         a[i][j] = getchar() -  0 ;         nums[j] += a[i][j];       }       getchar();     }     for (int i = 0; i < n; i++) {       for (int j = 0; j < m; j++) {         if (a[i][j]) {           if (nums[j] == 1) goto A;         }       }       std::cout <<  YES ;       return 0;     A:;     }     printf( NO );     return 0;   }   