Chef has provided with a sequence of integers of length $N$ arranged in an unsorted fashion.
The elements of the sequence are ordered as ${A1,A2,A3.....A'N}$
The task of the chef is to identify the highest and lowest value among the given sequence. It is assured that the sequence given contains the highest and the lowest value always
Please help chef in finding the desired value.

-----Input:-----
- First line will contain $N$, number of elements in the sequence.  
- Next line contains  $N$ integers of the sequence  . 

-----Output:-----
Print the HIGHEST and  LOWEST value of the sequence respectively.

-----Constraints-----
- $1 \leq N \leq 100$
- $2 \leq  {A1,A2,A3.....A'N}  \leq 10^4$

-----Sample Input:-----
5
3 2 7 9 4

-----Sample Output:-----
9 2

-----EXPLANATION:-----
This list is :
[3,2,7,9,4]  so the highest value is 9 and lowest is 2 respectively.

Source: codechef | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
n = int(input())
a = list(map(int, input().split()))
a.sort()
print(a[-1], a[0])


n = int(input())
arr = list(map(int, input().split()))
print(max(arr), min(arr))


try:
	n = int(input())
	num = list(map(int, input().split()[:n]))
	m1 = max(num)
	m2 = min(num)
	print(m1, m2)
except:
	pass


int(input())
arr = [int(i) for i in input().split()]
print(max(arr), min(arr))


n = int(input())
l = list(map(int, input().split()))
print(max(l), min(l))


n = int(input())
l = list(map(int, input().split()))
a = min(l)
b = max(l)
print(f'{b} {a}')


N = int(input())
arr = list(map(int, input().split()))
print(max(arr), min(arr))


n = int(input())
l = list(map(int, input().split()))
l.sort()
print(l[-1], l[0])


N = int(input())
A = list(map(int, input().split()))
print(max(A), min(A))


T = int(input())
x = list(map(int, input().split()))
maxx = max(x)
minn = min(x)
print(maxx, minn)


T = int(input())
s = input() + ' '
n = 0
maxn = 0
for i in range(T):
	term = ''
	y = s[n]
	while y != ' ':
		term += y
		n += 1
		y = s[n]
	n += 1
	if int(term) > maxn:
		maxn = int(term)
	if i == 0:
		minn = int(term)
	elif int(term) < minn:
		minn = int(term)
print(maxn, minn)


n = int(input())
l = [int(i) for i in input().split()][:n]
l = sorted(l)
print(l[-1], l[0])


x = int(input())
l = list(map(int, input().split()))
print(max(l), min(l))


n = int(input())
a = [int(i) for i in input().split()]
print(max(a), '', min(a))


t = int(input())
a = list(map(int, input().split()))
print(max(a), min(a))


n = int(input())
lst = [int(x) for x in input().split()]
print(max(lst), min(lst))


def __starting_point():
	n = int(input())
	li = list(map(int, input().split()))
	print(max(li), min(li))
__starting_point()


n = int(input())
a = list(map(int, input().split()))
print(max(a), min(a))


n = int(input())
l = sorted(list(map(int, input().split())))
print(l[-1], l[0])