# coding: utf-8 row, column = map(int, input().split()) for _ in range(row): if 'LOVE' in input(): print('YES') exit() # There is no LOVE print('NO')