def lscan; gets.split.map(&:to_i); end n = gets.to_i xy = [lscan,lscan].transpose mx = xy.map{|x,y| x+y}.min p mx p 0 puts xy.map{|x,y| x} p mx