import re def mainProc(lst): for s in lst : if re.search('LOVE',s) is not None: print('YES') break else : print('NO') if __name__ == '__main__': n, m = map(int,input().split()) lst = [] for i in range(n) : lst.append(input()) mainProc(lst)