e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Competitions

Marathon weekend with restrictions

Quadrilateral

prb1120

The coordinates of four distinct points are given on the plane in order of their passing. Determine the type of the resulting quadrilateral.

Input

The first line contains the number of shapes n (1n100). Each of the following line contains 8 integers - the coordinates of the vertices of a shape. It is guaranteed that all tests are correct. All coordinates do not exceed 1000 by absolute value.

Output

For each figure determine its form in format given in sample output.

Time limit 1 second
Memory limit 122.17 MiB
Input example #1
4
1 1 3 1 3 3 1 3
5 1 4 3 5 5 6 3
7 1 9 1 9 5 7 5
10 1 11 4 13 4 14 1
Output example #1
Case 1: Square
Case 2: Rhombus
Case 3: Rectangle
Case 4: Other
Source Stage II All-Ukrainian Olympiad 2010-2011 Berdichev