#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 5;
char s[N][N];
bool mk[N];
int n, m;
vector<int> v[N];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", s[i] + 1);
  for (int j = 1; j <= m; j++)
    for (int i = 1; i <= n; i++)
      if (s[i][j] == '1') v[j].push_back(i);
  for (int i = 1; i <= m; i++) {
    if (v[i].size() == 1) mk[v[i][0]] = true;
  }
  bool res = false;
  for (int i = 1; i <= n; i++)
    if (!mk[i]) res = true;
  puts(res ? "YES" : "NO");
  return 0;
}
