n , m = gets.chomp.split.map(&:to_i) n.times do if gets.include?("LOVE") puts "YES" exit end end puts "NO"