AVERAGE - Average

no tags 

Description

Given a list of numbers, compute the median and the mean.
  • Median - When the list is sorted, the median is the middle number. If the length of the list is even, the median is halfway between the two middle numbers.
  • Mean - The arithmetic mean is the sum divided by the length of the list.

Input

The first line is the N, the length of the list of numbers (1 <= N <= 100). The next N lines are integers between 1 and 1000 inclusive.

Output

On the first line, print the median. On the second line, print the mean. Your answer must be accurate within three decimal places.
Input Input
5
1
2
3
4
5
4
3
11
4
3
Output Output
3
3
3.5
5.25


Added by:BYU Admin
Date:2013-10-17
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64