n = int(input())
D = [int(d) for d in input().split()]
sort_D = sorted(D)
mid = int(n / 2)
max_easy = sort_D[mid - 1]
min_difc = sort_D[mid]
print(min_difc - max_easy)

132854b2d984a7025808cfc4e73ec028153e0735
<mask token>

<mask token>
print(min_difc - max_easy)

n = int(input())
D = [int(d) for d in input().split()]
sort_D = sorted(D)
mid = int(n / 2)
max_easy = sort_D[mid - 1]
min_difc = sort_D[mid]
print(min_difc - max_easy)
