#K10591. Triangle Classification
Triangle Classification
Triangle Classification
You are given three integers representing the side lengths of a triangle. Your task is to classify the triangle into one of the following categories:
- Equilateral: All three sides are equal.
- Isosceles: Exactly two sides are equal.
- Scalene: All three sides are different.
However, if the three sides do not satisfy the triangle inequality, i.e. if any of the following conditions fails:
$$a + b > c,\quad b + c > a,\quad c + a > b,$$
then the three sides cannot form a valid triangle and you should output "not a triangle".
The input will be provided through standard input (stdin) and the output should be printed to standard output (stdout).
inputFormat
The input consists of a single line containing three space-separated integers a, b, and c which represent the side lengths of a triangle.
outputFormat
Output a single string that is one of the following: "equilateral", "isosceles", "scalene", or "not a triangle".
## sample2 2 2
equilateral