Stiff Waist Beast is a electric god in NTHU CS. He has lots of friends. All his friends live on Tsing Hua Street. the i-th friend lives in number ai. We define D as the sum of the distances from him to his friends' homes.
One day, Stiff Waist Beast is going to move to the street. Since he often goes to visit his friends, so he wants to move to a place on Tsing Hua Street such that D is the smallest. Can you help him find the place?
(There might be some people lives in the same place, since every building has many floors.)
The first line has one integer N, means Stiff Waist Beast has n friends.
The next line has N integers a1 a2 ... aN.
1 <= N <= 2e5.
0 <= ai <= 1e9.
Please output the place Stiff Waist Beast should move to and the smallest D.
(If there are multiple places make D the smallest, please output the smallest one.)
Some examples: