#include <bits/stdc++.h>
using namespace std;
bitset<2005> a[2005];
bitset<2005> k;
int main() {
  int i, j, n, m;
  char c;
  scanf("%d %d", &n, &m);
  getchar();
  for (i = 1; i <= m; i++) a[i].reset();
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      scanf("%c", &c);
      if (c == '0') a[i].set(j);
    }
    getchar();
  }
  int sign = 0;
  for (i = 1; i <= n; i++) {
    k.set();
    for (j = 1; j <= n; j++)
      if (j != i) {
        k = k & a[j];
      }
    if (k.none()) {
      sign = 1;
      break;
    }
  }
  if (sign == 0)
    printf("NO\n");
  else
    printf("YES\n");
}
