Seungmin measures the traffic on the Mapo Bridge. He hung two strings across the road, parallel and a fixed distance apart. Every time a car wheel rolls over a string, a small box at the end of that string records the time. Records from the left string go into the left box, records from the right string go into the right box.
One car coming from the left leaves four records.
A car coming from the right follows the same rule with left and right swapped. The right box gets t and t+500, the left box gets t+1000 and t+1500.
At most one car is on a string at any moment. Given the recorded times in the two boxes, find how many cars came from the left.
The first line has the number of test cases n (1≤n≤100).
The first line of each test case has m (0≤m≤200), the number of times recorded in one box. Each car leaves two records in each box, so m is even. The second line has the m times from the left box, and the third line has the m times from the right box. Every time is a non-negative integer smaller than 109, and the times come in no particular order. When m=0, both lines are empty.
The input can always be explained by a set of cars that obey the rules above.
For each test case, print the number of cars that came from the left, one per line.