import sys input = lambda :sys.stdin.readline()[:-1] ni = lambda :int(input()) na = lambda :list(map(int,input().split())) yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES") no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO") ####################################################################### sys.setrecursionlimit(10**6) n = ni() m = ni() s = [input() for j in range(m)] def saiki(f, d): if len(f) <= 1: return True if d == m: return False a = [] b = [] for i in f: if s[d][i] == "0": a.append(i) else: b.append(i) del f return saiki(a, d+1) & saiki(b, d+1) if saiki(list(range(n)), 0): Yes() else: No()