n, m = input().strip().split() n = int(n) for i in range(n): if 'LOVE' in input().strip(): print('YES') break else: print('NO')