a,b,c = input().split() a = int(a) b = int(b) c = int(c) d = a*a e = b*c if e>d : print("RECTANGLE") elif d>e : print("SQUARE") else : print("SAME")