from fractions import Fraction A,B = list(map(int,input().split())) H,W = list(map(int,input().split())) rotate = min(Fraction(H,B), Fraction(W,A)) not_rotate = min(Fraction(H,A), Fraction(W,B)) if(rotate > not_rotate): print("Rotating") elif(rotate == not_rotate): print("Same") else: print("Non-rotating")