#include <bits/stdc++.h>
using namespace std;
char mang[2001][2001];
bool kiemtra() {
  int hang = 0, cot = 0;
  cin >> hang;
  cin >> cot;
  for (size_t i = 0; i < hang; i++) {
    for (size_t j = 0; j < cot; j++) {
      cin >> mang[i][j];
    }
  }
  for (size_t i = 0; i < hang; i++) {
    bool fl = true;
    for (size_t j = 0; j < cot; j++) {
      if (mang[i][j] == '1') fl = false;
    }
    if (fl) {
      return true;
    }
  }
  for (int i = 0; i < hang; i++) {
    bool flag = true;
    for (size_t j = 0; j < cot; j++) {
      if (mang[i][j] == '1') {
        bool co = false;
        for (size_t k = 0; k < hang; k++) {
          if (k != i && mang[k][j] == '1') {
            co = true;
            break;
          }
        }
        if (!co) {
          flag = false;
          break;
        }
      }
    }
    if (flag) {
      return true;
    }
  }
  return false;
}
int main() {
  if (kiemtra()) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
