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