#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  char L[n][m];
  int V[m];
  memset(V, 0, sizeof(V));
  for (int i = 0; i < n; i++) {
    scanf("%s", &L[i]);
    for (int j = 0; j < m; j++) {
      if (L[i][j] == '1') V[j]++;
    }
  }
  int f = 0;
  for (int i = 0; i < n; i++) {
    int j = 0;
    while (j < m) {
      if ((L[i][j] == '1') && (V[j] == 1))
        break;
      else if (j == m - 1) {
        f = 1;
      }
      j++;
    }
    if (f) break;
  }
  if (f)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
