N=int(input()) i=1 ans="NO" while i!=N: word=input() if "LOVE" in word: ans="YES" break else: ans="NO" i+=1 print(ans)