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