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