N = int(eval(input()))

A = sorted(list(map(int, input().split())))



ans_n = A.pop()

target = ans_n / 2



ans_r = - 1

high_score = 0

for r in A:

    min_r = min(ans_n - r, r)

    if min_r >= high_score:

        high_score = r

        ans_r = r



print((ans_n, ans_r))

N = int(eval(input()))

A = list(map(int, input().split()))



n, r = max(A), None

A.pop(A.index(n))

target, best_score = n / 2, float('inf')

for a in A:

    score = abs(a - target)

    if score < best_score:

        best_score = score

        r = a



print((n, r))

N = int(eval(input()))
A = sorted(list(map(int, input().split())))
ans_n = A.pop()
target = ans_n / 2
ans_r = -1
high_score = 0
for r in A:
    min_r = min(ans_n - r, r)
    if min_r >= high_score:
        high_score = r
        ans_r = r
print((ans_n, ans_r))

N = int(eval(input()))
A = list(map(int, input().split()))
n, r = max(A), None
A.pop(A.index(n))
target, best_score = n / 2, float("inf")
for a in A:
    score = abs(a - target)
    if score < best_score:
        best_score = score
        r = a
print((n, r))

-A = sorted(list(map(int, input().split()))) -ans_n = A.pop() -target = ans_n / 2 -ans_r = -1 -high_score = 0 -for r in A: -    min_r = min(ans_n - r, r) -    if min_r >= high_score: -        high_score = r -        ans_r = r -print((ans_n, ans_r)) +A = list(map(int, input().split())) +n, r = max(A), None +A.pop(A.index(n)) +target, best_score = n / 2, float("inf") +for a in A: +    score = abs(a - target) +    if score < best_score: +        best_score = score +        r = a +print((n, r))