#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, lamps[2002], sol = 0, cs;
  memset(lamps, 0, sizeof(lamps));
  cin >> n >> m;
  string s[2002];
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (s[i][j] == '1') lamps[j]++;
  for (int i = 0; i < n; i++) {
    cs = 1;
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '1' && lamps[j] < 2) {
        cs = 0;
        break;
      }
    }
    if (cs == 1) {
      sol = 1;
      break;
    }
  }
  if (sol)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
