#include <bits/stdc++.h>
const int maxn = 2000 + 5;
char a[maxn][maxn];
int b[maxn];
int main(void) {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%s", a[i] + 1);
  }
  for (int j = 1; j <= m; j++) {
    for (int i = 1; i <= n; i++) {
      b[j] += a[i][j] - '0';
    }
  }
  bool can = false;
  for (int i = 1; i <= n; i++) {
    bool cur = true;
    for (int j = 1; j <= m; j++) {
      int tmp = b[j] - (a[i][j] == '1');
      if (tmp == 0) {
        cur = false;
        break;
      }
    }
    if (cur) {
      can = true;
      break;
    }
  }
  can ? puts("YES") : puts("NO");
  return 0;
}
