A, B = map(int,input().split())
H, W = map(int, input().split())

if A > B and H > W or A < B and H < W:
    print('Non-rotating')
elif A > B and H < W or A < B and H > W:
    print('Rotating')
else:
    print('Same')