print("NYOE S"["LOVE"in "".join([input() for _ in range(int(input().split()[0]))])::2])