#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1);
const long double eps = 1e-9;
const long long INF = 1e9;
const long long inf = -1e9;
long double SqrLD(long double a) { return a * a; }
long long SqrLL(long long a) { return a * a; }
int SqrINT(int a) { return a * a; }
bool Equal(long double a, long double b) { return fabs(a - b) < eps; }
bool LessOrEqual(long double a, long double b) { return a < b || Equal(a, b); }
bool MoreOrEqual(long double a, long double b) { return a > b || Equal(a, b); }
bool Less(long double a, long double b) { return (!Equal(a, b) && a < b); }
bool More(long double a, long double b) { return (!Equal(a, b) && a > b); }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(20);
  setlocale(LC_ALL, "Russian");
  int n, m;
  cin >> n >> m;
  char data[n][m];
  map<int, int> mapp;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> data[i][j];
      if (data[i][j] == '1') {
        mapp[j]++;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    bool flag = true;
    for (int j = 0; j < m; j++) {
      if (data[i][j] == '1') {
        if (mapp[j] <= 1) {
          flag = false;
        }
      }
    }
    if (flag) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
