#CCBCMCHIN0000053. Phân loại tam giác theo góc và cạnh (Triangle Types)

Phân loại tam giác theo góc và cạnh (Triangle Types)

Triangle Types

Source: beecrowd

Version: Phuoc Hung OJ Extended

Problem Statement

Given positive real side lengths A,B,CA,B,C. In descending order A≥B≥CA\ge B\ge C, if A≥B+CA\ge B+C no triangle exists. Otherwise classify its angles by comparing A2A^2 with B2+C2B^2+C^2 and additionally report whether it is equilateral or isosceles when applicable. A valid triangle may produce two lines.

Input

One line contains three positive real values A,B,CA,B,C, each with at most one decimal digit.

Output

If no triangle exists, print NAO FORMA TRIANGULO only. Otherwise print one of TRIANGULO RETANGULO, TRIANGULO OBTUSANGULO, TRIANGULO ACUTANGULO, optionally followed by TRIANGULO EQUILATERO or TRIANGULO ISOSCELES on the next line.

Subtasks

  • Subtask 1 (20 points): 0 < A,B,C <= 10, at most one decimal digit.

  • Subtask 2 (30 points): 0 < A,B,C <= 100, at most one decimal digit.

  • Subtask 3 (50 points): 0 < A,B,C <= 1000, at most one decimal digit.

Examples

Example 1

Input

3.0 4.0 5.0

Output

TRIANGULO RETANGULO

Explanation

For this input, the case-specific computation and the required exact output are shown above. The sides form a right triangle but not an isosceles triangle.

Example 2

Input

7.0 7.0 7.0

Output

TRIANGULO ACUTANGULO
TRIANGULO EQUILATERO

Explanation

For this input, the case-specific computation and the required exact output are shown above. An equilateral triangle is also acute.