Drop links or images here to add them to the editor.

Maximum and Minimum Together ⭐⭐

Read an integer N. This number indicates how many values the array will have.

Then, read N integers (one per line) and store them in an array.

Finally, find the largest and smallest number in the array in a single pass, and display them on the same line.

Hints:

Input

An integer N, followed by N integers, one per line.

Output

Print on a single line the maximum and minimum using the following exact format:

Max:X Min:Y

Example

Input:

5
3
7
1
9
5

Output:

Max:9 Min:1