There are multiple test cases. The first line of input contains a single integer T denoting the number of test cases. (T <= 500)

For each test case, there are 10 lines in total.

The first 3*2 lines describe the two triangles. Each line with two integers denotes the coordinates of a point.

The next 4 lines describe the quadrangle in clockwise order or counter-clockwise order.

All coordinates are less than 15000 in absolute value.