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