#include <bits/stdc++.h>
using namespace std;
int a[3000][3000];
int k[4000];
int main() {
  int n, m;
  int i;
  int j;
  char ch;
  cin >> n >> m;
  getchar();
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      cin >> ch;
      a[i][j] = ch - '0';
    }
    getchar();
  }
  memset(k, 0, sizeof(k));
  for (i = 1; i <= m; i++) {
    int sum = 0;
    int p = 1;
    for (j = 1; j <= n; j++) {
      sum += a[j][i];
      if (a[j][i] == 1) {
        p = j;
      }
    }
    if (sum == 1) {
      k[p] = 1;
    }
  }
  int sum1 = 0;
  for (i = 1; i <= m; i++) {
    sum1 += k[i];
  }
  if (sum1 == n || n == 1) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
  }
  return 0;
}
