Triangle Classification

No attempts yetTime limit1sMemory limit128 MB

Problem

Ggung learned about triangles at school today. Triangles are grouped by their side lengths.

  • An equilateral triangle has three sides of the same length. All three angles are 60 degrees.
  • An isosceles triangle has two sides of the same length. Two of its angles are also equal.
  • A scalene triangle has three sides of different lengths, and all three angles differ. Some scalene triangles are right triangles.

The math teacher assigned homework: classify a triangle from its three side lengths. Ggung would much rather go play, so do the homework for him.

Input

The first line contains the number of test cases TT (1T1001 \le T \le 100).

Each of the next TT lines contains three space-separated integers AA, BB, CC (1A,B,C1,000,0001 \le A, B, C \le 1{,}000{,}000), the three sides of a triangle.

Output

For each test case print one line in the form Case #x: type, where xx is the test case number starting at 1 and type is the kind of triangle.

If the three lengths form a triangle, print equilateral, isosceles, or scalene. Otherwise print invalid!. The lengths form a triangle only when the longest side is shorter than the sum of the other two. If the two values are equal, it is not a triangle.