#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, m, cnt[2000] = {0}, find = 0, arr[2000];
  cin >> n >> m;
  char str[2000][2001];
  for (i = 0; i < n; i++) cin >> str[i];
  for (i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (str[i][j] == '1') {
        cnt[j]++;
      }
    }
  }
  int l = 0;
  for (i = 0; i < m; i++) {
    if (cnt[i] <= 1) {
      for (int j = 0; j < n; j++) {
        if (str[j][i] == '1') {
          arr[l] = j;
          l++;
        }
      }
    }
  }
  for (i = 0; i < l; i++) {
    for (int j = i; j < l; j++) {
      if (arr[i] > arr[j]) arr[i] = arr[i] + arr[j] - (arr[j] = arr[i]);
    }
  }
  int con = 1;
  for (i = 1; i < l; i++) {
    if (arr[i] != arr[i - 1]) {
      con++;
    }
  }
  if (con == n) {
    cout << "NO\n";
  } else {
    cout << "YES\n";
  }
  return 0;
}
