#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int cntr[20] = {0};
int main() {
  int n, k;
  cin >> n >> k;
  int i, j, x;
  for (i = 0; i < n; i++) {
    int num = 0;
    for (j = 0; j < k; j++) {
      cin >> x;
      num = 2 * num + x;
    }
    cntr[num]++;
  }
  if (cntr[0] > 0) {
    cout << "YES" << endl;
    return 0;
  } else if (cntr[1] > 0 &&
             (cntr[2] > 0 || cntr[4] > 0 || cntr[6] > 0 || cntr[8] > 0 ||
              cntr[10] > 0 || cntr[12] > 0 || cntr[14] > 0)) {
    cout << "YES" << endl;
    return 0;
  } else if (cntr[2] > 0 && (cntr[5] > 0 || cntr[12] > 0 || cntr[13] > 0 ||
                             cntr[8] > 0 || cntr[4] > 0 || cntr[9] > 0)) {
    cout << "YES" << endl;
    return 0;
  } else if (cntr[3] > 0 && (cntr[4] > 0 || cntr[12] > 0 || cntr[8] > 0)) {
    cout << "YES" << endl;
    return 0;
  } else if (cntr[4] > 0 &&
             (cntr[8] > 0 || cntr[9] > 0 || cntr[10] > 0 || cntr[11] > 0)) {
    cout << "YES" << endl;
    return 0;
  } else if (cntr[5] > 0 && (cntr[10] > 0 || cntr[8] > 0)) {
    cout << "YES" << endl;
    return 0;
  } else if (cntr[6] > 0 && (cntr[8] > 0 || cntr[9] > 0)) {
    cout << "YES" << endl;
    return 0;
  } else if (cntr[7] > 0 && cntr[8] > 0) {
    cout << "YES" << endl;
    return 0;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
