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