#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<vector<int>> A(n, vector<int>(m));
  for (int i = 0; i < n; i++) {
    for (int q = 0; q < m; q++) {
      char a;
      cin >> a;
      if (a == '1') {
        A[i][q] = 1;
      } else {
        A[i][q] = 0;
      }
    }
  }
  vector<int> sums(m);
  for (int i = 0; i < n; i++) {
    for (int q = 0; q < m; q++) {
      if (A[i][q] == 1) {
        sums[q]++;
      }
    }
  }
  int check = 0;
  for (int i = 0; i < n; i++) {
    for (int q = 0; q < m; q++) {
      if (sums[q] - A[i][q] == 0) {
        check++;
        break;
      }
    }
  }
  if (check == n) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
  }
  return 0;
}
