import sys input = sys.stdin.readline N, M = map(int, input().split()) S = [input().strip() for _ in range(M)] T = set(S) if "1"*N not in T: print("No") exit() for i in range(N): for j in range(i+1, N): si = S[i] sj = S[j] if si&sj not in T: print("No") exit() dp = [0 for _ in range(N)] for s in S: for i in range(N): if s[i]=="1": dp[i] = 1 if "0"*N not in T: print("No") exit() dp.reverse() tmp = "".join(map(str, dp)) if tmp not in T: print("No") exit() print("Yes")