a,b = map(int,input.split()) for i in range(a): c = input() if c.find == -1: continue else: print("YES") quit() print("NO")