def solve(N: int, M: int, S: list[int]) -> bool: S_st = set(S) # 条件1 if (1 << N) - 1 not in S_st: return False # 条件2 for i in range(M): for j in range(i + 1, M): if S[i] & S[j] not in S_st: return False # 条件3 for b in range(1 << M): x = 0 for i in range(M): if b & (1 << i): x |= S[i] if x not in S_st: return False return True N, M = map(int, input().split()) S = [int(input(), 2) for _ in range(M)] print("Yes" if solve(N, M, S) else "No")