#include <bits/stdc++.h>
using namespace std;
const int maxn = 2005;
int a[maxn][maxn];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      char x;
      cin >> x;
      a[i][j] = x - '0';
    }
  }
  vector<int> col(m, 0);
  for (int j = 0; j < m; ++j) {
    for (int i = 0; i < n; ++i) {
      col[j] += a[i][j];
    }
  }
  vector<int> row(n, 0);
  for (int j = 0; j < m; ++j) {
    if (col[j] > 1) continue;
    for (int i = 0; i < n; ++i) {
      if (a[i][j] == 1) {
        row[i] = true;
        break;
      }
    }
  }
  for (auto i : row)
    if (!i) exit(puts("YES"));
  puts("NO");
  return 0;
}
