#include <bits/stdc++.h>
using namespace std;
char a[2020][2020];
int vis[2020];
int lamp[2020];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cin >> a[i][j];
  }
  for (int j = 0; j < m; j++) {
    int cnt = 0;
    int I;
    for (int i = 0; i < n; i++) {
      if (a[i][j] == '1') {
        cnt++;
        I = i;
      }
    }
    if (cnt == 1) vis[I] = 1;
  }
  for (int i = 0; i < n; i++) {
    if (vis[i] == 0) {
      memset(lamp, 0, sizeof(lamp));
      for (int x = 0; x < n; x++) {
        if (x != i) {
          for (int y = 0; y < m; y++) {
            if (a[x][y] == '1') {
              lamp[y] = 1;
            }
          }
        }
      }
      int p = 0;
      for (int j = 0; j < m; j++) {
        if (lamp[j] == 1) p++;
      }
      if (p == m) {
        cout << "YES" << endl;
        return 0;
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
