Problem:


Area of Polygons

Polygons are the most fundamental objects in geometric processing.
Complex figures are often represented and handled as polygons
with many short sides.
If you are interested in the processing of geometric data,
you'd better try some programming exercises about basic
operations on polygons.

Your job in this problem is to write a program that computes the area of polygons.

A polygon is represented by a sequence of points that are its vertices.
If the vertices p1, p2, ..., pn are given, line segments connecting
pi and pi+1 (1 n and p1 is also a side of the polygon.

You can assume that the polygon is not degenerate.
Namely, the following facts can be assumed without any input data checking.

No point will occur as a vertex more than once.

Two sides can intersect only at a common endpoint (vertex).

The polygon has at least 3 vertices.

Note that the polygon is not necessarily convex.
In other words, an inner angle may be larger than 180 degrees.

Input

The input contains multiple data sets, each representing a polygon.
A data set is given in the following format.

   n
   x1 y1
   x2 y2
   ...
   xn yn

The first integer n is the number of vertices,
such that 3 i is given by (xi, yi).
xi and yi are integers between 0 and 1000 inclusive.
The coordinates of vertices are given in the order
of clockwise visit of them.

The end of input is indicated by a data set with 0 as the value of n.

Output

For each data set, your program should output its sequence number
(1 for the first data set, 2 for the second, etc.) and the area of the polygon separated by a single space. The area should be printed with one digit to the right of the decimal point.

The sequence number and the area should be printed on the same line.
Since your result is checked by an automatic grading program,
you should not insert any extra characters nor lines on the output.

Sample Input

3
1 1
3 4
6 0

7
0 0
10 10
0 20
10 30
0 40
100 40
100 0

0

Output for the Sample Input

1 8.5
2 3800.0



Sample input:
3
1 1
3 4
6 0

7
0 0
10 10
0 20
10 30
0 40
100 40
100 0

0


Sample output:
1 8.5
2 3800.0

Submission status: Runtime Error

Solution code:
c=0
while True:
    n=input()
    if n==0:
        break
    c+=1
    a0, b0=map(int,raw_input().split())
    prev_a, prev_b=a, b
    tmp=0
    for i in range(n):
        a, b=map(int,raw_input().split())
        tmp+=(a-prev_a)**2+(b-prev_b)**2
        prev_a, prev_b=a, b
    tmp+=(prev_a-a0)**2+(prev_b-b0)**2
    print c, tmp**0.5

Submission status: Runtime Error

Solution code:
c=0
while True:
    n=input()
    if n==0:
        break
    c+=1
    a0, b0=map(int,raw_input().split())
    prev_a, prev_b=a0, b0
    tmp=0
    for i in range(n):
        a, b=map(int,raw_input().split())
        tmp+=(a-prev_a)**2+(b-prev_b)**2
        prev_a, prev_b=a, b
    tmp+=(prev_a-a0)**2+(prev_b-b0)**2
    print c, tmp**0.5

Submission status: Runtime Error

Solution code:
c=0
while True:
    n=input()
    if n==0:
        break
    c+=1
    x0, y0=map(int,raw_input().split())
    prev_x, prev_y=x0, y0
    tmp=0
    for i in range(n):
        x,y=map(int,raw_input().split())
        tmp+=prev_x*y - prev_y*x
        prev_x, prev_y=x, y
    tmp+=prev_x*y0 - prev_y*x0
    print c, 0.5*abs(tmp)

Submission status: Runtime Error

Solution code:
c=0
while True:
    n=input()
    if n==0:
        break
    c+=1
    x0, y0=map(int,raw_input().split())
    prev_x, prev_y=x0, y0
    tmp=0
    for i in range(n-1):
        x,y=map(int,raw_input().split())
        tmp+=prev_x*y - prev_y*x
        prev_x, prev_y=x, y
    tmp+=prev_x*y0 - prev_y*x0
    print c, 0.5*abs(tmp)

Submission status: Runtime Error

Solution code:
c=0
while True:
    n=input()
    if n==0:
        break
    c+=1
    x0, y0=map(int,raw_input().split())
    prev_x, prev_y=x0, y0
    tmp=0
    for i in range(n-1):
        x,y=map(int,raw_input().split())
        tmp+=prev_x*y - prev_y*x
        prev_x, prev_y=x, y
    tmp+=prev_x*y0 - prev_y*x0
    print c, 0.5*abs(tmp)
    input()

Submission status: Runtime Error

Solution code:
c=0
while True:
    n=input()
    if n==0:
        break
    c+=1
    x0, y0=map(int,raw_input().split())
    prev_x, prev_y=x0, y0
    tmp=0
    for i in range(n-1):
        x,y=map(int,raw_input().split())
        tmp+=prev_x*y - prev_y*x
        prev_x, prev_y=x, y
    tmp+=prev_x*y0 - prev_y*x0
    print c, 0.5*abs(tmp)
    skip=input()

Submission status: Runtime Error

Solution code:
import numpy
import scipy

Submission status: Runtime Error

Solution code:
import numpy
print("hello")