n = int(eval(input()))

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

ans = 0

d.sort()

k = d[int(n/2)]

while k > d[int(n/2)-1]:

   k -= 1

   ans += 1

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

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



d.sort()



print((d[n//2] - d[n//2 - 1]))
n = int(eval(input()))
d = list(map(int, input().split()))
ans = 0
d.sort()
k = d[int(n / 2)]
while k > d[int(n / 2) - 1]:
    k -= 1
    ans += 1
print(ans)

n = int(eval(input()))
d = list(map(int, input().split()))
d.sort()
print((d[n // 2] - d[n // 2 - 1]))

-ans = 0 -k = d[int(n / 2)] -while k > d[int(n / 2) - 1]: -    k -= 1 -    ans += 1 -print(ans) +print((d[n // 2] - d[n // 2 - 1]))