$n=<>;$/=$";$m+=$_/2for<>;$n-=$m=2*$n-$m/($n-1);print"$m $n"