#include <bits/stdc++.h>
using namespace std;
char s[2006][2006];
int n, m, sum[2006], ok;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", s[i]);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (s[i][j - 1] == '1') sum[j]++;
  for (int i = 1; i <= n; i++) {
    ok = 1;
    for (int j = 1; j <= m; j++) {
      if (s[i][j - 1] == '1')
        if (sum[j] == 1) {
          ok = 0;
          break;
        }
    }
    if (ok) break;
  }
  if (ok)
    printf("YES");
  else
    printf("NO");
}
