c,l=map(int,input().split()) mozi="" for i in range(c): temp=input() mozi=mozi+temp if mozi.find("LOVE")==-1: print("NO") else: print("YES")