选择小组,然后选择自己班级,开始练习!

1073 : 输出最大值和最小值
Description

从给的n个数字中找到最大值和最小值,并输出。

Input

输入数字n,让后输入n个整数,n不超过100。

Output

其他的最大值和最小值

Examples

Input

8
79 86 75 42 97 24 48 88

Output

97 24
Language:
Theme: