for _ in range(int(input())): h, w = map(int, input().split()) res = 0 if h <= w: res += w * h res -= h * h res -= h else: res += w * (w + 1) res -= h * w print('sepa' if res >= 0 else 'ryota')