#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int INF = 0x3f3f3f3f;
const int maxn = 2005;
const double eps = 1e-8;
char mat[maxn][maxn];
vector<int> cnt[maxn];
int main() {
  string ans = "YES";
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      cin >> mat[i][j];
      if (mat[i][j] == '1') cnt[j].push_back(i);
    }
  int vis[maxn] = {};
  for (int i = 1; i <= m; i++) {
    if (cnt[i].size() != 1) continue;
    for (int j = 0; j < cnt[i].size(); j++) vis[cnt[i][j]] = 1;
  }
  int tmp = 0;
  for (int i = 1; i <= n; i++)
    if (vis[i]) tmp++;
  if (tmp == n) ans = "NO";
  cout << ans << endl;
  return 0;
}
