Students

Vlado is a professor at the Faculty of Computer Science and Engineering. During the last semester, Vlado was teaching Algorithms and Data Structures to two groups of students (let's call them group A and group B). For each student in each group, Vlado has an estimate of how well that student knows the subject material. He also knows in what group each of the students belongs.

Students prepare for exams by studying with all other students from their group. Vlado, being an experienced professor, already knows this, and he wants to help his students perform better at the subject exam, by moving exactly one student from one group to the other (from group A to group B, or vice versa), in order to increase the average knowledge of both groups. How many students are there, such that, after moving them from one group to the other, the average knowledge of both groups strictly increases?

For example, let's say that one of the groups has 3 students (with knowledge 60, 80 and 100), and the other group has 3 students with knowledge 40, 40 and 70. The average knowledge of the first group is (60+80+100)/3 = 80, and the average knowledge of the second group is (40+40+70)/3 = 50. Here, Vlado can move the student with knowledge 60 from the first group to the second group. That way, the average knowledge of the first group will increase to (80+100)/2 = 90, and the average knowledge of the second group will increase to (40+40+70+60)/4 = 52.5.



Input

The first line of input contains one positive integer T (1 <= T <= 10), the number of test cases.

The first line of every test case starts with a number N (2 <= N <= 20 000), followed by N numbers that define the knowledge Xi (1 <= Xi <= 1 000) of each student in the first group.

The second line starts with a number M (2 <= M <= 20 000), followed by M numbers that define the knowledge Yi (1 <= Yi <= 1 000) of each student in the second group.



Output

For each test case, on a separate line, output the required number of students.



Constraints

Time limit: 2 seconds
Memory limit: 64 megabytes



Examples


input
3
3 60 80 100
3 40 40 70
3 10 10 10
3 10 20 20
3 10 10 20
5 20 20 20 20 30
output
1
0
4


 Submit your code