N,M=map(int, input().split()) c=-1;ans='Yes' S=set() for i in range(M): s=int(input(),2) S.add(s) if s==0: ans='No' if c==-1: c=s else: c&=s if c not in S: ans='No' s=N-bin(c)[2:].count('1') if M!=pow(2,s): ans='No' print(ans)