a,b,c=map(int,input().split()) s1=a*a s2=b*c if s1>s2: print("SQUARE") elif s1<s2: print("RECTANGLE") else: print("SAME")