n, _ = gets.split.map(&:to_i) ans = "NO" n.times do ans = "YES" if /LOVE/.match(gets.chomp) end puts ans