#include <bits/stdc++.h>
long long gcd(long long x, long long y) {
  return y % x == 0 ? x : gcd(y % x, x);
}
template <class T>
T my_abs(T a) {
  if (a < 0) a = -a;
  return a;
}
const int maxn = 2000 + 7;
int mp[maxn][maxn], n, m, pre[maxn][maxn];
char str[maxn][maxn];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = (int)(1); i <= (int)(n); i++) scanf("%s", str[i] + 1);
  for (int i = (int)(1); i <= (int)(n); i++)
    for (int j = (int)(1); j <= (int)(m); j++) mp[i][j] = str[i][j] - '0';
  for (int i = (int)(1); i <= (int)(n); i++)
    for (int j = (int)(1); j <= (int)(m); j++) {
      pre[i][j] = pre[i - 1][j] + mp[i][j];
    }
  bool flag = false;
  for (int i = (int)(1); i <= (int)(n); i++) {
    bool t = true;
    for (int j = (int)(1); j <= (int)(m); j++) pre[n][j] -= mp[i][j];
    for (int j = (int)(1); j <= (int)(m); j++)
      if (pre[n][j] < 1) t = false;
    flag |= t;
    if (flag) break;
    for (int j = (int)(1); j <= (int)(m); j++) pre[n][j] += mp[i][j];
  }
  if (flag)
    puts("YES");
  else
    puts("NO");
  return 0;
}
