n, m = gets.chomp.split.map(&:to_i) s = '' n.times do s << gets.chomp end puts s.index('LOVE') ? 'YES' : 'NO'