#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(NULL);
  cin.tie(0);
  cout.tie(0);
  int n, m1 = 0, i, m, j;
  cin >> n >> m;
  char ar[n][m];
  int v[m];
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      cin >> ar[i][j];
    }
  }
  for (j = 0; j < m; j++) {
    m1 = 0;
    for (i = 0; i < n; i++) {
      m1 = m1 + (ar[i][j] - '0');
    }
    v[j] = m1;
  }
  int temp1 = 0, temp2 = 0;
  for (i = 0; i < n; i++) {
    temp1 = 0;
    temp2 = 0;
    for (j = 0; j < m; j++) {
      if (ar[i][j] == '1') {
        temp2 = 1;
      }
      if (v[j] == 1 && ar[i][j] == '1') {
        temp1 = 1;
        break;
      }
    }
    if (temp1 == 0 || temp2 == 0) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
