#OLD387. Data Analysis

Data Analysis

Description

Data analysis has always been a popular discipline in programming world. Eliot is one of the top scientists in the field of computer science. He had a strong interest in data analysis before. So now he has been doing research related to data analysis. He is currently studying a problem and has made great progress. Are you interested in studying this issue together? Now given the measurement data composed of N integers, ensure they are in order (ascend or descend). Please find the maximum value, median value, minimum value in this set of data.

Format

Input

Input contains an integer NN in the first line.(N<1000)(N<1000)

The second line contains NN integers a1,a2,...,ana_1,a_2,...,a_n.(aia_i is less than 1000000,1in1 \leq i \leq n)

Output

Output the maximum, median, and minimum values in the order from largest to smallest (integer is normally output without decimal point, decimal rounds to one decimal place).

Samples

3
-1 2 4

4 2 -1
4
-2 -1 3 4
4 1 -2

Hint