Triangle classification is an important problem in modern mathematics. Mathematicians have developed many criteria according to which a triangle can be classified. In this problem, you will be asked to classify some triangles according to their sides and angles.


According to their measure, angles may be:

Acute — an angle that is less than 90 degrees
Right — a 90-degrees angle
Obtuse — an angle that is greater than 90 degrees
  

According to their sides, triangles may be:

Scalene — all sides are different
Isosceles — exactly two sides are equal
  

According to their angles, triangles may be:

Acute — all angles are acute
Right — one angle is right
Obtuse — one angle is obtuse
  
Triangles with three equal sides (equilateral triangles) will not appear in the test data.
The triangles formed by three collinear points are not considered in this problem. In order to classify a triangle, you should use only the adjactives from the statement. There is no triangle which could be described in two different ways according to the classification characteristics considered above.

Input
The first line of input contains an integer SUBTASK_ID denoting the subtask id this input belongs to.
The second line of input contains an integer T denoting the number of test cases. The description of T test cases follows.

The only line of each test case contains six integers x1, y1, x2, y2, x3 and y3 denoting Cartesian coordinates of points, that form the triangle to be classified.


It is guaranteed that the points are non-collinear.


Output
For each test case, output a single line containing the classification of the given triangle.
If SUBTASK_ID equals 1, then the classification should follow the "<Side classification starting with a capital letter> triangle" format.
If SUBTASK_ID equals 2, then the classification should follow the "<Side classification starting with a capital letter> <angle classification> triangle" format.
Please, check out the samples section to better understand the format of the output.

Constraints

1 ≤ T ≤ 60
|xi|, |yi| ≤ 100
Example 1

Input:
1
2
0 0 1 1 1 2
3 0 0 4 4 7

Output:
Scalene triangle
Isosceles triangle


Example 2

Input:
2
6
0 0 4 1 1 3
0 0 1 0 1 2
0 0 1 1 1 2
0 0 2 1 1 2
3 0 0 4 4 7
0 0 2 1 4 0

Output:
Scalene acute triangle
Scalene right triangle
Scalene obtuse triangle
Isosceles acute triangle
Isosceles right triangle
Isosceles obtuse triangle
from math import sqrt, fabs
subid = input()

T = input()
compare = float(10**-6)

for hell in range(T):

    x1,y1,x2,y2,x3,y3 = map(float, raw_input().split())

    tside1 = sqrt( (x1 - x2)**2 + (y1 - y2)**2 )
    tside2 = sqrt( (x2 - x3)**2 + (y2 - y3)**2 )
    tside3 = sqrt( (x3 - x1)**2 + (y3 - y1)**2 )

    side1 = max( tside1, tside2, tside3 )
    side3 = min( tside1, tside2, tside3 )
    side2 = (tside1 + tside2 + tside3) - (side1 + side3)

    if fabs(side1 - side2)<compare or fabs(side2 - side3)<compare:
        print "Isosceles",

    else:
        print "Scalene",

    if subid == 2:

        if (side1 - sqrt( side2**2 + side3**2 )) > compare:
            print "obtuse",
        elif fabs(side1 - sqrt( side2**2 + side3**2 )) < compare:
            print "right",
        else:
            print "acute",

    print "triangle"