#include <bits/stdc++.h>
using namespace std;
char a[2005][2005];
int n, m, used[2005], used1[2005];
vector<int> vec[2005];
int main() {
  cin.tie(0), cout.tie(0), ios::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) cin >> a[i][j];
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == '1') {
        vec[j].push_back(i);
      }
    }
  }
  int check1 = 0;
  for (int i = 1; i <= m; i++) {
    if (vec[i].size() == 1) {
      used1[vec[i][0]] = 1;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (used1[i] == 0) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
}
