TRNG - Triangles

Aditya is good in Maths. And he is also helping in nature. One day Riya couldn't solve a homework problem. So she went to Aditya's home. But he is busy as it is his "chat time". So now she wants your help to solve the problem.

Given the co-ordinates of two triangles. Find out the one with maximum area.

  • If the area of both triangles are the same, print 0.
  • If the area of first triangle is greater, print 1 area_of_first_triangle up to two decimal places.
  • If the area of second triangle is greater, print 2 area_of_second_triangle up to two decimal places.

Input

The first input line contains integer T (T <= 1000) which represents the number of test cases. Each test case consists of 2 lines with 6 integers each.

0 <= x1, y1, x2, y2, x3, y3 <= 100 - the coordinates of the first triangle.

0 <= p1, q1, p2, q2, p3, q3 <= 100 - the coordinates of the second triangle.

Output

Print the answer to Riya's homework problem in newline.

Note:

The triangle may be a degenerate triangle (Collinear points - triangle with zero area).

Example

Input:
2
1 1 2 2 3 1
4 4 5 5 6 4
1 1 2 2 3 1
4 4 5 5 6 6

Output:
0
1 1.00

Added by:Rajesh Kumar
Date:2013-08-11
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:AASF - ABV-IIITM PC-11-8-2013

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.