#include <bits/stdc++.h>
using namespace std;
long long n, m, bu[2010];
char c;
bool mdo[2010][2010];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= m; j++) {
      cin >> c;
      if (c == '1') {
        mdo[i][j] = true;
        bu[j]++;
      }
    }
  }
  for (long long i = 1; i <= n; i++) {
    bool band = true;
    for (long long j = 1; j <= m; j++) {
      if (mdo[i][j]) {
        if (bu[j] <= 1) {
          band = false;
          break;
        }
      }
    }
    if (band) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
