N, M = map(int, input().split()) assert(1 <= N <= 16 and 1 <= M <= min(1 << N, 1 << 12)) s = [] for i in range(M): si = input() assert(all(i in "01" for i in si) and len(si) == N) s.append(int(si, 2)) st = set(s) ok = True if 0 not in st or (1 << N)-1 not in st: ok = False for s0 in s: for s1 in s: if s0 & s1 not in st: ok = False if s0 | s1 not in st: ok = False print("Yes" if ok else "No")