N=int(input()) M=int(input()) S=[input() for i in range(M)] LIST=[0]*(N*(N-1)//2) for i in range(M): x=S[i] now=0 for j in range(N): for k in range(j+1,N): if x[j]!=x[k]: LIST[now]=1 now+=1 if N==1 or min(LIST)==1: print("Yes") else: print("No")