a,b=map(int,input().split()) h,w=map(int,input().split()) non=min(a/w,b/h) rot=min(b/w,a/h) # print(non,rot) if non==rot: print("Same") elif non>=rot: print("Rotating") else: print("Non-rotating")