import math

def py():

    print("Yes")

def pn():

    print("No")

def iin():

    x = int(eval(input()))

    return x



neko = 0

nya = 0

nuko = 0



n = iin()

d = [int(x) for x in input().split()]

d.sort()



neko = int(n/2 - 1)

nuko = neko + 1

if d[neko] != d[nuko]:

    for i in range(d[nuko]-d[neko]):

        nya = nya + 1

    

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

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

d = sorted(d)

ans = d[n//2] - d[n//2-1]

print(ans)

import math


def py():
    print("Yes")


def pn():
    print("No")


def iin():
    x = int(eval(input()))
    return x


neko = 0
nya = 0
nuko = 0
n = iin()
d = [int(x) for x in input().split()]
d.sort()
neko = int(n / 2 - 1)
nuko = neko + 1
if d[neko] != d[nuko]:
    for i in range(d[nuko] - d[neko]):
        nya = nya + 1
print(nya)

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

-import math - - -def py(): -    print("Yes") - - -def pn(): -    print("No") - - -def iin(): -    x = int(eval(input())) -    return x - - -neko = 0 -nya = 0 -nuko = 0 -n = iin() -d = [int(x) for x in input().split()] -d.sort() -neko = int(n / 2 - 1) -nuko = neko + 1 -if d[neko] != d[nuko]: -    for i in range(d[nuko] - d[neko]): -        nya = nya + 1 -print(nya) +n = int(eval(input())) +d = list(map(int, input().split())) +d = sorted(d) +ans = d[n // 2] - d[n // 2 - 1] +print(ans)