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