x = 'LOVE' n, m = map(int, input().split()) for i in range(n): if x in input(): print('YES') exit() print('NO')