#include <iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a*a<c*b){ cout<<"RECTANGLE"; }else if(a*a>c*b){ cout<<"SQUARE"; }else{ cout<<"SAME"; } }