#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 2;
int n, m;
int vis[N] = {};
bool chk() {
  for (int i = 0; i < m; i++) {
    if (!vis[i]) return 0;
  }
  return 1;
}
int main() {
  string str[N];
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    cin >> str[i];
    for (int j = 0; j < str[i].size(); j++)
      if (str[i][j] == '1') vis[j]++;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < str[i].size(); j++)
      if (str[i][j] == '1') vis[j]--;
    if (chk()) {
      puts("YES");
      return 0;
    }
    for (int j = 0; j < str[i].size(); j++)
      if (str[i][j] == '1') vis[j]++;
  }
  printf("NO\n");
  return 0;
}
