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