#include <bits/stdc++.h>
using namespace std;
char a[2100][2100];
int lamp[2100];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      char t;
      cin >> t;
      a[i][j] = t;
      if (t == '1') lamp[j]++;
    }
  }
  int flag = 0;
  for (int i = 1; i <= n; i++) {
    flag = 0;
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == '1') lamp[j]--;
      if (!lamp[j]) {
        flag = 1;
        break;
      } else
        flag = 0;
    }
    if (!flag) break;
    for (int j = 1; j <= m; j++)
      if (a[i][j] == '1') lamp[j]++;
  }
  if (flag)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
