Triangles
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

There are 3 kinds ofTriangles: acute triangles, right triangles and obtuse triangles.A triangle with an obtuse angle (the obtuse angle is greater than 90 degrees and less than 180 degrees) is an obtuse triangle (obviously only one angle can be obtuse angle). The three internal angles of a triangle are all acute angles (the acute angle is greater than zero and less than 90 degrees), which is called "acute triangle"; one internal angle is right angle (the right angle is equal to 90 degrees), which is called "right triangle".

Given the coordinates of three verticesof a triangle,write a program to judge the kind of the triangle. Note that three points may not form a triangle (for example, two or three vertices coincide, or three points are collinear).


输入描述:

The first line contains one integerN(N ≤ 10,000), the number oftriangles.
The following N lines, each line contains six integersin the following format:x1 y1 x2 y2 x3 y3Where (xi,yi)  i=1,2,3 arethe coordinates of three verticesof the triangle.

-10,000≤ xi,yi ≤ 10,000 i=1,2,3

输出描述:

OutputN lines. For each triangle, output one line.

If the three points do not form a triangle, output "invalid"(Without quotation marks)

If three points form an obtuse triangle, output "obtuse"(Without quotation marks)

If three points form an acute triangle, output "acute"(Without quotation marks)

If three points constitute a right triangle, output "right"(Without quotation marks)

示例1

输入

复制
4
0 0 2 0 1 2
0 0 0 1 1 0
0 0 1 0 -1 -1
0 0 1 0 2 0

输出

复制
acute
right
obtuse
invalid