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