r ,c = map(int,(input().split())) list_1 ='' for i in input(): list_1 += i print("YES" if list_1.count("LOVE") >0 else "NO")