#include <bits/stdc++.h>
using namespace std;
const long long int N = 2e5 + 5;
void solve() {
  long long int n, m, i, j;
  cin >> n >> m;
  string s[n];
  for (auto &x : s) {
    cin >> x;
  };
  vector<long long int> cnt(m, 0);
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      cnt[j] += (s[i][j] == '1');
    }
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (s[i][j] == '1' && cnt[j] <= 1) {
        break;
      }
    }
    if (j == m) {
      cout << "YES";
      return;
    }
  }
  cout << "NO";
}
signed main() {
  long long int t = 1;
  while (t--) {
    solve();
  }
}
