c,r=map(int,input().split()) st="" for i in range(c): st+=input() flg="LOVE" in st if flg==True: print("YES") else: print("NO")