n = int(eval(input()))



AB = []

for _ in range(n):

    ab = tuple(map(int, input().split()))

    AB.append(ab)



AB_A = sorted(AB, key=lambda x: x[0])

AB_B = sorted(AB, key=lambda x: x[1])



if n%2==1:

    sa, sb = AB_A[n//2]

    la, lb = AB_B[n//2]

    print((lb - sa + 1))

else:

    sal, sbl = AB_A[n//2-1]

    sar, sbr = AB_A[n//2]



    lal, lbl = AB_B[n//2-1]

    lar, lbr = AB_B[n//2]

    print(((lbl + lbr) - (sal + sar) +1))

n = int(eval(input()))

A = []

B = []

for _ in range(n):

    a, b = tuple(map(int, input().split()))

    A.append(a)

    B.append(b)



A = sorted(A)

B = sorted(B)



if n%2==1:

    sa = A[n//2]

    lb = B[n//2]

    print((lb - sa + 1))

else:

    sal = A[n//2-1]

    sar = A[n//2]



    lbl = B[n//2-1]

    lbr = B[n//2]

    print(((lbl + lbr) - (sal + sar) +1))

n = int(eval(input()))
AB = []
for _ in range(n):
    ab = tuple(map(int, input().split()))
    AB.append(ab)
AB_A = sorted(AB, key=lambda x: x[0])
AB_B = sorted(AB, key=lambda x: x[1])
if n % 2 == 1:
    sa, sb = AB_A[n // 2]
    la, lb = AB_B[n // 2]
    print((lb - sa + 1))
else:
    sal, sbl = AB_A[n // 2 - 1]
    sar, sbr = AB_A[n // 2]
    lal, lbl = AB_B[n // 2 - 1]
    lar, lbr = AB_B[n // 2]
    print(((lbl + lbr) - (sal + sar) + 1))

n = int(eval(input()))
A = []
B = []
for _ in range(n):
    a, b = tuple(map(int, input().split()))
    A.append(a)
    B.append(b)
A = sorted(A)
B = sorted(B)
if n % 2 == 1:
    sa = A[n // 2]
    lb = B[n // 2]
    print((lb - sa + 1))
else:
    sal = A[n // 2 - 1]
    sar = A[n // 2]
    lbl = B[n // 2 - 1]
    lbr = B[n // 2]
    print(((lbl + lbr) - (sal + sar) + 1))

-AB = [] +A = [] +B = [] -    ab = tuple(map(int, input().split())) -    AB.append(ab) -AB_A = sorted(AB, key=lambda x: x[0]) -AB_B = sorted(AB, key=lambda x: x[1]) +    a, b = tuple(map(int, input().split())) +    A.append(a) +    B.append(b) +A = sorted(A) +B = sorted(B) -    sa, sb = AB_A[n // 2] -    la, lb = AB_B[n // 2] +    sa = A[n // 2] +    lb = B[n // 2] -    sal, sbl = AB_A[n // 2 - 1] -    sar, sbr = AB_A[n // 2] -    lal, lbl = AB_B[n // 2 - 1] -    lar, lbr = AB_B[n // 2] +    sal = A[n // 2 - 1] +    sar = A[n // 2] +    lbl = B[n // 2 - 1] +    lbr = B[n // 2]