Area

No attempts yetTime limit1sMemory limit128 MB

Problem

Being well known for its highly innovative products, a certain company would make a tempting target for industrial espionage. To protect its brand-new research and development facility, the company has installed the latest system of surveillance robots patrolling the area. These robots move along the walls of the facility and report suspicious observations to the central security office. The only flaw a competitor's agent could find is that the robots radio their movements unencrypted. Unable to learn anything more, the agent wants to use that information to calculate the exact size of the area occupied by the new facility. It is public knowledge that all the corners of the building sit on a rectangular grid and that only straight walls are used. Figure 1 shows the course of a robot around an example area.

Figure 1: Example area.

You are hired to write a program that calculates the area occupied by the new facility from the movements of a robot along its walls. You may assume this area is a polygon with corners on a rectangular grid. However, your boss insists that you use a formula he is so proud to have found somewhere. The formula relates the number $I$ of grid points strictly inside the polygon, the number $E$ of grid points on its edges, and the total area $A$ of the polygon. Unfortunately, you have lost the sheet on which he wrote it down, so your first task is to find that simple formula yourself.

Input

The first line contains the number of scenarios.

For each scenario, the first line contains the number $m$ of movements of the robot, with $3 \le m < 100$. Each of the following $m$ lines contains a pair "dx dy" of integers, separated by a single blank, satisfying $-100 \le \text{dx}, \text{dy} \le 100$ and $(\text{dx}, \text{dy}) \ne (0, 0)$. Such a pair means that the robot moves to the grid point dx units to the right and dy units upward relative to its current position.

You may assume that the curve along which the robot moves is closed and that it does not intersect or even touch itself except at the start and end points. The robot moves counter-clockwise around the building, so the area to be calculated lies to the left of the curve. It is known in advance that the whole polygon fits into a square on the grid with a side length of 100 units.

Output

For each scenario, first print a line "Scenario #i:", where $i$ is the number of the scenario, starting at 1. Then print a single line containing $I$, $E$, and $A$ — the number of interior grid points, the number of boundary grid points, and the area $A$ rounded to one digit after the decimal point — separated by single spaces. Separate consecutive scenarios with a blank line.