2020-09-28 12:49:17 +00:00
|
|
|
// R38989380
|
|
|
|
|
|
|
|
#include <bits/stdc++.h>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
int a, b, c, d;
|
|
|
|
cin >> a >> b >> c >> d;
|
|
|
|
// abc abd acd bcd
|
|
|
|
if (a + b > c && a + c > b && b + c > a || a + b > d && a + d > b && b + d > a || a + c > d && a + d > c && c + d > a || b + c > d && b + d > c && c + d > b) {
|
|
|
|
cout << "TRIANGLE" << endl;
|
2021-11-19 09:01:13 +00:00
|
|
|
} else if (a + b >= c && a + c >= b && b + c >= a || a + b >= d && a + d >= b && b + d >= a || a + c >= d && a + d >= c && c + d >= a || b + c >= d && b + d >= c && c + d >= b) {
|
2020-09-28 12:49:17 +00:00
|
|
|
cout << "SEGMENT" << endl;
|
2021-11-19 09:01:13 +00:00
|
|
|
} else {
|
2020-09-28 12:49:17 +00:00
|
|
|
cout << "IMPOSSIBLE" << endl;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|