#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, sum[2005] = {0}, jl[2005];
  string s[2005];
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> s[i];
  if (n == 1)
    cout << "NO" << endl;
  else {
    int x = 0, y = 0, j, k;
    for (j = 0; j < m; j++) {
      for (k = 0; k < n; k++) {
        sum[j] += (s[k][j] - '0');
      }
      if (sum[j] == 0) {
        cout << "NO" << endl;
        return 0;
      }
      if (sum[j] == 1) {
        for (k = 0; k < n; k++) {
          if (s[k][j] == '1') {
            jl[y] = k;
            y++;
            break;
          }
        }
      }
    }
    sort(jl, jl + y);
    int l = unique(jl, jl + y) - jl;
    if (l == n)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
