n = int(input()) for _ in range(n): s = input() if 'LOVE' in s: print('YES'); break else: print('NO')