for _ in[0]*int(input().split()[0]): if 'LOVE' in input(): print('YES') break else: print('NO')