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