from fractions import Fraction a, b = map(int,input().split()) h, w = map(int,input().split()) t = min(Fraction(h, a), Fraction(w, b)) s = min(Fraction(w, a), Fraction(h, b)) if t == s: print("Same") elif t > s: print("Non-rotating") else: print("Rotating")