#include <bits/stdc++.h>
using namespace std;
bool arr[2001][2001];
int m, n;
int counter[2001] = {0};
bool check(int i) {
  for (int j = 0; j < m; j++) {
    if (arr[i][j] and counter[j] <= 1) return false;
  }
  return true;
}
int main() {
  cin >> n >> m;
  string s;
  for (int i = 0; i < n; i++) {
    cin >> s;
    for (int j = 0; j < m; j++) {
      if (s[j] == '1') {
        arr[i][j] = 1;
        counter[j]++;
      } else
        arr[i][j] = 0;
    }
  }
  bool flag = false;
  for (int i = 0; i < n; i++) {
    if (check(i)) {
      flag = true;
      cout << "YES" << endl;
      break;
    }
  }
  if (!flag) cout << "NO" << endl;
  return 0;
}
