from collections import Counter

N = int(eval(input()))

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



cnt = Counter(D)

lst = []

for key in sorted(cnt.keys()):

    lst.append([key, cnt[key]])



ans = 0

tmp = 0

for i, kv in enumerate(lst):

    key, value = kv

    tmp += value

    if tmp == N - tmp:

        if i + 1 < len(lst):

            ans = lst[i+1][0] - key

            break

        else:

            break

print(ans)
n = int(eval(input()))

d = sorted(map(int, input().split()))



a = d[n//2-1]

b = d[n//2]

print((b-a))

# print(d)

from collections import Counter

N = int(eval(input()))
D = list(map(int, input().split()))
cnt = Counter(D)
lst = []
for key in sorted(cnt.keys()):
    lst.append([key, cnt[key]])
ans = 0
tmp = 0
for i, kv in enumerate(lst):
    key, value = kv
    tmp += value
    if tmp == N - tmp:
        if i + 1 < len(lst):
            ans = lst[i + 1][0] - key
            break
        else:
            break
print(ans)

n = int(eval(input()))
d = sorted(map(int, input().split()))
a = d[n // 2 - 1]
b = d[n // 2]
print((b - a))
# print(d)

-from collections import Counter - -N = int(eval(input())) -D = list(map(int, input().split())) -cnt = Counter(D) -lst = [] -for key in sorted(cnt.keys()): -    lst.append([key, cnt[key]]) -ans = 0 -tmp = 0 -for i, kv in enumerate(lst): -    key, value = kv -    tmp += value -    if tmp == N - tmp: -        if i + 1 < len(lst): -            ans = lst[i + 1][0] - key -            break -        else: -            break -print(ans) +n = int(eval(input())) +d = sorted(map(int, input().split())) +a = d[n // 2 - 1] +b = d[n // 2] +print((b - a)) +# print(d)