#include <bits/stdc++.h>
using namespace std;
bitset<2048> s[2007];
bitset<2048> pref[2007], suff[2007];
int main() {
  int n;
  cin >> n;
  int m;
  cin >> m;
  for (int i = 1; i <= n; i++) {
    cin >> s[i];
    pref[i] = s[i] | pref[i - 1];
  }
  for (int i = n; i >= 1; i--) {
    suff[i] = s[i] | suff[i + 1];
  }
  for (int i = 1; i <= n; i++) {
    auto e = pref[i - 1] | suff[i + 1];
    if (e.count() == m) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
