In 2*N* - 1 boxes there are apples and oranges. Your task is to choose *N* boxes so, that they will contain not less than half of all the apples and not less than half of all the oranges.
The first input line contains one number *T* — amount of tests. The description of each test starts with a natural number *N* — amount of boxes. Each of the following 2*N* - 1 lines contains numbers *a*<sub class="lower-index">*i*</sub> and *o*<sub class="lower-index">*i*</sub> — amount of apples and oranges in the *i*-th box (0 ≤ *a*<sub class="lower-index">*i*</sub>, *o*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>). The sum of *N* in all the tests in the input doesn't exceed 10<sup class="upper-index">5</sup>. All the input numbers are integer.
#!/bin/python3

import sys


s,t = input().strip().split(' ')
s,t = [int(s),int(t)]
a,b = input().strip().split(' ')
a,b = [int(a),int(b)]
#print(a)
#print(b)
m,n = input().strip().split(' ')
m,n = [int(m),int(n)]
apple = [int(apple_temp) for apple_temp in input().strip().split(' ')]
orange = [int(orange_temp) for orange_temp in input().strip().split(' ')]
countA = 0;
countO = 0;
for i in apple:
    if(i + a >= s and i + a <= t):
        countA += 1

for j in orange:
    if(j + b >= s and j + b <= t):
        countO += 1    

print(countA)

print(countO)