A, B = map(int, input().split()) H, W = map(int, input().split()) no = min(W ** 2 * A / B, H ** 2 * B / A) yes = min(W ** 2 * B / A, H ** 2 * A / B) print("Same" if yes == no else "Non-rotating" if yes < no else "Rotating")