#include <bits/stdc++.h>
using namespace std;
int arr[2010];
char s[2010][2010];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> s[i];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '1') arr[j]++;
    }
  }
  for (int i = 0; i < n; i++) {
    int t = 0;
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '1' && arr[j] < 2) {
        t = 1;
        break;
      }
    }
    if (!t) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
