#include<bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if(a * a > b * c) cout <<"SQUARE"; else if(a * a < b * c) cout <<"RECTANGLE"; else if(a * a == b * c) cout <<"SAME"; return 0; } /* 1.if语句 www.stem86.com 小蓝老师微信 */