n, m = gets.split.map{ |e| e.to_i } s = readlines puts s.any?{ |r| r.include?("LOVE") } ? "YES" : "NO"