
The bee flu is running through the hives. To keep the colony alive, the bees of Inner Dreaded Illnessia keep a few cells of the hive free as safe zones. A bee that gets into a safe zone before the bacteria do survives the outbreak. The honey needs room too, so there are far fewer safe zones than bees and the bees have to share them out. Work out how many of them can be saved.
The hive is a hexagonal grid. Every cell has a coordinate (x,y), and cell (x,y) touches the six cells (x+1,y), (x−1,y), (x,y+1), (x,y−1), (x+1,y−1) and (x−1,y+1). The picture shows how the coordinates run. The hive is so large that no bee ever reaches its border.
The first line contains the number of test cases T. Each test case consists of four lines. The first line holds N, S and B: the number of bees, of safe zones and of bacteria colonies. The second line holds x1 y1 x2 y2 … xN yN, the cells where the bees start. The third line holds the S safe zones in the same format, and the fourth line the B cells where the bacteria start.
For each test case, print one line with the largest number of bees that can be saved.