Count households inside East Germany that lie within a West German tower radius and outside every jammer radius.
Medium4GeometryNo attempts yetTime limit6sMemory limit256 MBUnder Soviet influence, East Germany kept tight control over access to media. Many East Germans still received West German channels in secret and watched them at home. Whether a home received such a channel depended on where the television towers stood, how far away they were, and whether a jamming device sat close by.
You are given the polygon that forms the border of East Germany, the positions and broadcast radii of several television towers, and the positions and radii of the jammers. A household receives West German television if it lies within the broadcast radius of at least one tower located in West Germany and within the radius of no jammer. Count the households that receive West German television.
Every household lies at least 0.001 away from the radius boundary of any tower or jammer, on the inside or on the outside.
The first line contains the number of data sets K. Then K data sets follow, each in this form.
The first line contains four integers n, H, T, B. Here n is the number of points that describe the geography of East Germany, with 3≤n≤1000. H is the number of households, with 0≤H≤1000, T is the number of television towers, with 0≤T≤50, and B is the number of jammers, with 0≤B≤50.
The next n lines each contain two real numbers, the coordinates of one corner of the polygon, given in order along the border. The order can be clockwise or counterclockwise. The polygon never crosses itself.
The next H lines each contain two real numbers, the position of one household. Every household lies inside East Germany.
The next T lines each contain three real numbers xi, yi, ri. The pair (xi,yi) is the position of the i-th television tower and ri≥0 is its broadcast radius. A tower can stand inside or outside East Germany, but it never lies on the border. Every tower that is not inside East Germany counts as being in West Germany.
The last B lines each contain three real numbers xi, yi, ri. The pair (xi,yi) is the position of the i-th jammer and ri≥0 is its radius. Jammers always lie inside East Germany.
For each data set, first print Data Set x: on a line of its own, where x is the number of the data set counting from 1. On the next line print the number of households that receive West German television. Print one blank line after each data set.