puts gets.split.map(&:to_i).uniq.sort.each_cons(2).to_a.map(&:reverse).map{|x| x.reduce(:-)}.min || 0