def f(x): v = 0 now = 1 while x: v += int(x[-1]) * now now *= 2 x.pop() return v N, M = map(int, input().split()) S = set() for i in range(M): s = list(input()) S.add(f(s)) N2 = 1 << N if N2 - 1 not in S: print("No") exit() for s1 in S: for s2 in S: if s1 & s2 not in S: print("No") exit() L = list(S) for ss in range(N2): temp = 0 for i in range(N): if (ss >> i) & 1: temp |= L[i] if temp not in S: print("No") exit() print("Yes")