#include <bits/stdc++.h>
using namespace std;
namespace flyinthesky {
int n, m, a[2005][2005], gg[2005];
void clean() { memset(gg, 0, sizeof gg); }
int solve() {
  clean();
  cin >> n >> m;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) scanf("%1d", &a[i][j]);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) gg[j] += a[i][j];
  }
  for (int i = 1; i <= n; ++i) {
    int fl = 1;
    for (int j = 1; j <= m; ++j)
      if (a[i][j] && gg[j] <= 1) fl = 0;
    if (fl) return printf("YES\n"), 0;
  }
  printf("NO\n");
  return 0;
}
}  // namespace flyinthesky
int main() {
  flyinthesky::solve();
  return 0;
}
