#include <bits/stdc++.h>
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
long long gcd(long long first, long long second) {
  return !second ? first : gcd(second, first % second);
}
long long lcm(long long first, long long second) {
  return (first / gcd(first, second)) * second;
}
using namespace std;
int ar[3000][3000];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ofstream file_out;
  file_out.open("output.txt");
  ifstream file_in;
  file_in.open("input.txt");
  long long n, m;
  char a;
  cin >> n >> m;
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> a;
      if (a == '1') {
        ar[i][j] = j + 1;
        mp[j + 1]++;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (ar[i][j] != 0) ar[i][j] = mp[ar[i][j]];
    }
  }
  bool ok = 0, okk = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (ar[i][j] == 1) ok = 1;
    }
    if (!ok) return cout << "YES", 0;
    ok = 0;
  }
  cout << "NO" << '\n';
}
