A, B = map(int, input().split()) H, W = map(int, input().split()) def f(h, w): z1 = H / h a1 = H * z1 * w z2 = W / w a2 = W * z2 * h return min(a1, a2) s = f(A, B) t = f(B, A) if s > t: print('Non-rotating') elif s < t: print('Rotating') else: print('Same')