import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random #sys.setrecursionlimit(10**9) #sys.set_int_max_str_digits(0) #input = sys.stdin.readline # #alist = [] a,b = map(int,input().split()) h,w = map(int,input().split()) x = min((a,w*(a/h)),(h*(b/w),b)) h,w = w,h y = min((a,w*(a/h)),(h*(b/w),b)) x = x[0]*x[1] y = y[0]*y[1] if x > y: print('Non-rotating') elif x < y: print('Rotating') else: print('Same')