first = input() split_first = first.split() N=int(split_first[0]) ans="NO" for i in range(N): word=input() if "LOVE" in word: ans="YES" break else: ans="NO" print(ans)