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