#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  vector<long long> a(k);
  set<vector<long long> > s;
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < k; j++) cin >> a[j];
    s.insert(a);
  }
  if (s.size() == 1) {
    auto t = *s.begin();
    bool flag = true;
    for (long long i = 0; i < k; i++) {
      if (t[i]) flag = false;
    }
    if (flag)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
    return 0;
  }
  for (auto t : s) {
    for (auto p : s) {
      if (t != p) {
        bool flag = true;
        for (long long i = 0; i < k; i++) {
          if (t[i] && p[i]) flag = false;
        }
        if (flag) {
          cout << "YES" << endl;
          return 0;
        }
      }
    }
  }
  cout << "NO" << endl;
}
