#include <bits/stdc++.h>
using namespace std;
int n, m, ct;
int x[2005], y[2005];
char s[2005][2005];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%s", s[i]);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '1') {
        y[j]++;
        x[i]++;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    ct = 0;
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '1' && y[j] > 1) {
        ct++;
      }
    }
    if (ct == x[i]) {
      printf("YES\n");
      return 0;
    }
  }
  printf("NO\n");
}
