def ascan; gets.split.map(&:to_i); end gets; t = ascan.sort.each_cons(2).map{|l,r|r-l} p t.min p t.max