def solve(): from random import randint N=int(input()) M=int(input()) H=[0]*N; Mod1=10**9+7 beta=randint(2,Mod1-1) for i in range(M): S=input() for j in range(N): s=int(S[j]) H[j]=(beta*H[j]+s)%Mod1 return len(set(H))==N #================================================== import sys input=sys.stdin.readline write=sys.stdout.write print("Yes" if solve() else "No")