Triangle Type

Lab Python Intermediate 20 points

Read three side lengths on one line. Print invalid if they can't form a triangle (the two shorter sides must add up to more than the longest). Otherwise print equilateral, isosceles or scalene.

Input

Three positive integers.

Output

One word.

Example

Input

3 3 3

Output

equilateral
Sample input available Sample output available
Editor
Python

Hints

Sorting the sides puts the longest last.

After sorting, all equal means a == c.

Solution explanation

Sorting first removes the need to check every ordering of the sides.

Show solution
a, b, c = sorted(map(int, input().split()))
if a + b <= c:
    print("invalid")
elif a == c:
    print("equilateral")
elif a == b or b == c:
    print("isosceles")
else:
    print("scalene")
Output
Answer
HOME LEARN COMMUNITY DASHBOARD