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