n = gets.split.map(&:to_i).first output = "NO" n.times do if gets.include?("LOVE") output = "YES" break end end puts output