N=gets.to_i t=gets.split.map(&:to_i).inject(:+)/2/(N-1) puts [t,N-t]*" "