Skip to content
UPEEC

Mean and Median

Easy#math#statistics#sorting· solved by 0 · time limit 2.0 s

Print the mean (2 decimals) and the median (1 decimal) of nn integers. For even nn the median is the average of the two middle values.

Input

nn on the first line, then nn integers.

Output

Mean and median separated by a space.

Constraints

1≤n≤1051 \le n \le 10^5, ∣ai∣≤106|a_i| \le 10^6

Sample 1

Input

5
3 1 4 1 5

Output

2.80 3.0

Sign in or join free to run and submit your solution.