import std.stdio;
import std.range;
import std.array;
import std.string;
import std.conv;
import std.typecons;
import std.algorithm;
import std.container;
import std.typecons;
import std.random;
import std.csv;
import std.regex;
import std.math;
import core.time;
import std.ascii;
import std.digest.sha;
import std.outbuffer;
import std.numeric;
import std.bigint;

void main()
{
	int n, m;
	readln.chomp.split.tie(n, m);
	char[][] field = new char[][](n);
	foreach (ref a; field) {
		a = readln.chomp.dup;
	}
	int[] cnt = new int[](m);
	foreach (a; field) {
		foreach (i, v; a) {
			if (v == '0') {
				continue;
			}
			cnt[i]++;
		}
	}
	debug verbose(cnt);
	bool ok = false;
	foreach (i; 0..n) {
		// ignore i-th
		bool flag = true;
		foreach (j; 0..m) {
			if (field[i][j] == '0') {
				continue;
			}
			flag &= cnt[j] > 1;
		}
		ok |= flag;
	}
	writeln = ok ? "YES" : "NO";
}

void tie(R, Args...)(R arr, ref Args args)
		if (isRandomAccessRange!R || isArray!R)
in
{
	assert (arr.length == args.length);
}
body
{
	foreach (i, ref v; args) {
		alias T = typeof(v);
		v = arr[i].to!T;
	}
}

void verbose(Args...)(in Args args)
{
	stderr.write("[");
	foreach (i, ref v; args) {
		if (i) stderr.write(", ");
		stderr.write(v);
	}
	stderr.writeln("]");
}

