#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  string s[n];
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  set<int> imp;
  for (int j = 0; j < m; j++) {
    int cnt = 0, index = -1;
    for (int i = 0; i < n; i++) {
      if (s[i][j] == '1') {
        cnt++;
        index = i;
      }
    }
    if (cnt == 1) {
      imp.insert(index);
    }
  }
  if (imp.size() == n) {
    cout << "NO";
  } else {
    cout << "YES";
  }
  return 0;
}
