Sand Castles

No attempts yetTime limit1sMemory limit128 MB

Problem

It is amazing what beautiful structures you can build out of nothing but sand and a little water. Here the goal is modest: a few cylindrical towers (shaped with beach buckets) standing on a flat rectangular patch of sand, with a small rectangular moat dug around it.

There is one catch: you may not take sand from a neighboring patch, nor dump excess sand onto one. The amount of sand in your patch is fixed. So if you dig a deep moat relative to how much you pile up, you must raise the flat base level of your patch; if the moat is shallow and you build many towers, the base level ends up lower than the surrounding ground.

Your patch is a $w \times h$ rectangle. A moat of width $m$ runs all the way around the perimeter, dug to a uniform depth $d$ below the base level. Inside it you build $b$ cylindrical towers; the $i$-th tower has height $h_i$ and radius $r_i$ and rises above the base level. (Whether you stack the towers or stand them side by side makes no difference — only their total volume matters, and their combined footprint always fits on the patch.)

Because no sand enters or leaves the patch, the flat base level is raised or lowered relative to the surrounding ground. Determine by how many centimeters the base level is raised or lowered.

Note: this "no importing or exporting soil" rule sometimes applies to real construction too. When the Getty Center was built, one constraint was that no soil could be added to or removed from the site — which is why there are odd round towers at the corners, added as ornaments to hide the surplus earth.

Input

The first line contains an integer $K \ge 1$, the number of data sets. It is followed by $K$ data sets of the following form.

The first line of each data set contains five numbers $w$, $h$, $m$, $d$, $b$. Here $w$ and $h$ are the width and height of the patch in centimeters (real numbers), $m$ is the width of the moat (with $m < \tfrac{1}{2}\min(w, h)$), and $d$ is the depth of the moat in centimeters (also a real number). The integer $b\ (0 \le b \le 100)$ is the number of towers. The moat is always built along the perimeter of the patch.

This is followed by $b$ lines, each containing two real numbers $h_i$ and $r_i$: the height and radius of the $i$-th cylindrical tower. You may assume the towers always fit on the patch.

Output

For each data set, first output a line Data Set x: by itself, where $x$ is its number (starting from 1). Then, on the next line, output the total change in the base level of the patch, in centimeters, rounded to two decimals. If the base level is lowered, output it with a negative sign.