A,B=map(int,input().split()) H,W=map(int,input().split()) if A==B or H==W: print("Same") elif (AB and H>W): print("Non-rotating") else: print("Rotating")