#yuki700 import sys n,m=map(int,raw_input().split()) for i in xrange(n): s=raw_input() if s.count('LOVE')>0: print 'YES' sys.exit() print 'NO'