import re import sys n,m = map(int,raw_input().split()) for i in range(n): if re.match(r'.*LOVE.*',raw_input()): print 'YES' sys.exit() print 'NO'