Marbles

No attempts yetTime limit1sMemory limit256 MB

Problem

Three children A, B, and C play with marbles. Every marble is red, blue, or green. At the start of the game the marbles are thrown on the ground and scatter. No two marbles share the same xx coordinate, and no two share the same yy coordinate.

A, B, and C each draw one rectangular area on the ground. The sides of a rectangle are parallel to the axes, and the area is a closed region that contains its boundary. No two of the three rectangles may share even a single point. A rectangle can shrink to one point.

Child A then counts only the red marbles inside their own area, B counts only the blue marbles inside theirs, and C counts only the green marbles inside theirs. A child may count zero marbles. The goal of the game is to make the total number of counted marbles as large as possible.

Write a program that computes the largest total the three children can count.

Input

The first line contains the number of test cases TT.

Each test case starts with a line holding three integers aa, bb, and cc (1a,b,c100001 \le a, b, c \le 10000), the numbers of red, blue, and green marbles. Each of the next aa lines holds two integers xix_i and yiy_i, the position of a red marble. The next bb lines give the blue marbles in the same format, and the next cc lines give the green marbles. Every coordinate satisfies 0xi,yi1070 \le x_i, y_i \le 10^7.

Inside one test case, at most one marble lies on any horizontal line and at most one marble lies on any vertical line.

Output

For each test case, print one line with the maximum total number of counted marbles.