# No.700 LOVE n, m = [int(i) for i in input().split()] s = [input() for i in range(n)] picture = '' for i in s: picture += i print('YES' if 'LOVE' in picture else 'NO')