print("YES" if sum([1 if "LOVE" in input() else 0 for _ in range(list(map(int, input().split()))[0])]) else "NO")