#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
vector<int> v[4];
bool g(int i, int j, int k) {
  vector<int> a = v[i], b = v[j], c = v[k];
  vector<int> d;
  set_intersection(b.begin(), b.end(), a.begin(), a.end(), back_inserter(d));
  a.clear();
  set_intersection(c.begin(), c.end(), d.begin(), d.end(), back_inserter(a));
  if (a.size() != 0) return 1;
  return 0;
}
bool f(int i, int j) {
  vector<int> a = v[i], b = v[j];
  vector<int> c;
  set_intersection(b.begin(), b.end(), a.begin(), a.end(), back_inserter(c));
  if (c.size() != 0) return 1;
  return 0;
}
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    int x;
    for (int j = 0; j < k; ++j) {
      scanf("%d", &x);
      if (x == 0) v[j].push_back(i);
    }
  }
  if (k == 1) {
    if (v[0].size() != 0) {
      cout << "YES" << endl;
      return 0;
      ;
    }
    cout << "NO" << endl;
    return 0;
    ;
  }
  vector<int> inter = v[0];
  for (int i = 0; i < k; ++i) {
    if (v[i].size() == 0) {
      cout << "NO" << endl;
      return 0;
      ;
    }
    vector<int> flag;
    set_intersection(inter.begin(), inter.end(), v[i].begin(), v[i].end(),
                     back_inserter(flag));
    inter = flag;
  }
  if (k == 2 or inter.size() != 0) {
    cout << "YES" << endl;
    return 0;
    ;
  }
  if (k == 3) {
    if (f(0, 1)) {
      cout << "YES" << endl;
      return 0;
      ;
    }
    if (f(0, 2)) {
      cout << "YES" << endl;
      return 0;
      ;
    }
    if (f(2, 1)) {
      cout << "YES" << endl;
      return 0;
      ;
    }
    cout << "NO" << endl;
    return 0;
    ;
  }
  if (f(0, 1) and f(2, 3)) {
    cout << "YES" << endl;
    return 0;
    ;
  }
  if (f(0, 2) and f(3, 1)) {
    cout << "YES" << endl;
    return 0;
    ;
  }
  if (f(0, 3) and f(2, 1)) {
    cout << "YES" << endl;
    return 0;
    ;
  }
  if (g(0, 1, 2)) {
    cout << "YES" << endl;
    return 0;
    ;
  }
  if (g(3, 1, 2)) {
    cout << "YES" << endl;
    return 0;
    ;
  }
  if (g(0, 3, 2)) {
    cout << "YES" << endl;
    return 0;
    ;
  }
  if (g(0, 3, 1)) {
    cout << "YES" << endl;
    return 0;
    ;
  }
  cout << "NO" << endl;
  return 0;
  ;
  return 0;
}
