#include <bits/stdc++.h>
using namespace std;
const int maxn = 2005;
int n = 0, m = 0;
int A[maxn][maxn];
int D[maxn];
bool judge2() {
  for (int i = 1; i <= m; i++) {
    if (D[i] < 2) return false;
  }
  return true;
}
bool judge1() {
  for (int i = 1; i <= m; i++) {
    if (D[i] == 0) return false;
  }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie();
  memset(A, 0, sizeof(A));
  memset(D, 0, sizeof(D));
  cin >> n >> m;
  vector<vector<int> > L;
  for (int i = 1; i <= n; i++) {
    string te;
    cin >> te;
    vector<int> temp;
    for (int j = 0; j < m; j++) {
      if (te[j] == '1') temp.push_back(j + 1);
    }
    L.push_back(temp);
  }
  bool ok = 0;
  for (int k = 1; k <= n; k++) {
    memset(D, 0, sizeof(D));
    for (int i = 1; i <= n; i++) {
      if (i == k) continue;
      for (int j = 0; j < L[i - 1].size(); j++) {
        D[L[i - 1][j]]++;
      }
    }
    if (judge1() || judge2()) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
