You are a rebel leader and you are planning to start a revolution in your country. But the evil Government found out about your plans and set your punishment in the form of correctional labor.

You must paint a fence which consists of $10^{100}$ planks in two colors in the following way (suppose planks are numbered from left to right from $0$):   if the index of the plank is divisible by $r$ (such planks have indices $0$, $r$, $2r$ and so on) then you must paint it red;  if the index of the plank is divisible by $b$ (such planks have indices $0$, $b$, $2b$ and so on) then you must paint it blue;  if the index is divisible both by $r$ and $b$ you can choose the color to paint the plank;  otherwise, you don't need to paint the plank at all (and it is forbidden to spent paint on it). 

Furthermore, the Government added one additional restriction to make your punishment worse. Let's list all painted planks of the fence in ascending order: if there are $k$ consecutive planks with the same color in this list, then the Government will state that you failed the labor and execute you immediately. If you don't paint the fence according to the four aforementioned conditions, you will also be executed.

The question is: will you be able to accomplish the labor (the time is not important) or the execution is unavoidable and you need to escape at all costs.


-----Input-----

The first line contains single integer $T$ ($1 \le T \le 1000$) — the number of test cases.

The next $T$ lines contain descriptions of test cases — one per line. Each test case contains three integers $r$, $b$, $k$ ($1 \le r, b \le 10^9$, $2 \le k \le 10^9$) — the corresponding coefficients.


-----Output-----

Print $T$ words — one per line. For each test case print REBEL (case insensitive) if the execution is unavoidable or OBEY (case insensitive) otherwise.


-----Example-----
Input
4
1 1 2
2 10 4
5 2 3
3 2 2

Output
OBEY
REBEL
OBEY
OBEY

Difficulty: MEDIUM_HARD
Tags: Number theory

Mathematics

Greedy algorithms
Skill types: Greedy algorithms

Starter code:

Solutions:
import fractions
t = int(input())
for i in range(t):
	(a, b, k) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	g = fractions.gcd(a, b)
	a //= g
	b //= g
	if (k - 1) * a + 1 < b:
		print('REBEL')
	else:
		print('OBEY')


import sys, math

def input():
	return sys.stdin.readline()[:-1]

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // gcd(a, b)

def main():
	n = int(input())
	for _ in range(n):
		(r, b, k) = map(int, input().split())
		M = lcm(r, b)
		R = (M - 1) // r
		B = (M - 1) // b
		if max(math.ceil(R / (B + 1)), math.ceil(B / (R + 1))) >= k:
			print('REBEL')
		else:
			print('OBEY')
main()


def hcfnaive(a, b):
	if b == 0:
		return a
	else:
		return hcfnaive(b, a % b)
t = int(input())
for i in range(t):
	(r, b, k) = list(map(int, input().split()))
	m = max(r, b)
	n = min(r, b)
	g = hcfnaive(m, n)
	if (k - 1) * n + g >= m:
		print('OBEY')
	else:
		print('REBEL')


tc = int(input())
from math import gcd
while tc != 0:
	tc -= 1
	(a, b, k) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	if a * (k - 1) + gcd(a, b) < b:
		print('REBEL')
	else:
		print('OBEY')


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
for i in ' ' * int(input()):
	(r, b, k) = map(int, input().split())
	g = gcd(r, b)
	r /= g
	b /= g
	if r > b:
		(r, b) = (b, r)
	if r == 1:
		if b > k:
			print('REBEL')
		else:
			print('OBEY')
	elif r * (k - 1) + 1 <= b - 1:
		print('REBEL')
	else:
		print('OBEY')


from math import gcd
T = int(input())
for i in range(T):
	(r, b, k) = map(int, input().split())
	if r > b:
		tmp = r
		r = b
		b = tmp
	g = gcd(r, b)
	r = r // g
	b = b // g
	if r * (k - 1) + 1 < b:
		print('REBEL')
	else:
		print('OBEY')


import sys
input = sys.stdin.readline
from fractions import gcd
Q = int(input())
Query = [list(map(int, input().split())) for _ in range(Q)]
for (r, b, k) in Query:
	g = gcd(r, b)
	L = [r // g, b // g]
	m = min(L)
	l = max(L)
	if m * (k - 1) + 2 > l:
		print('OBEY')
	else:
		print('REBEL')


t = int(input())
for _ in range(t):
	(r, b, k) = map(int, input().split(' '))
	if r > b:
		(r, b) = (b, r)
	if b % r == 0:
		if b // r - 1 >= k:
			print('REBEL')
		else:
			print('OBEY')
		continue
	ok = True
	diff = r - ((b // r + 1) * r - b)
	x = r - r // diff * diff
	if r % diff == 0:
		x += diff
	if (b - x) // r + ((b - x) % r != 0) >= k:
		ok = False
	if ok:
		print('OBEY')
	else:
		print('REBEL')


import sys
import bisect as b
import math
input = sys.stdin.readline
mo = 10 ** 9 + 7

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def computeGCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
for i in range(inin()):
	(c, s, k) = cin()
	if c > s:
		(c, s) = (s, c)
	gcd = computeGCD(c, s)
	(c, s) = (c // gcd, s // gcd)
	gcd = computeGCD(c, s)
	if int(math.ceil((s - gcd) / c)) >= k:
		print('REBEL')
	else:
		print('OBEY')


import sys, os, io
from sys import stdin
from math import log, gcd, ceil
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
import math
alphabets = list('abcdefghijklmnopqrstuvwxyz')

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	return list(set(l))

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def si():
	return input()

def prefix_sum(arr):
	r = [0] * (len(arr) + 1)
	for (i, el) in enumerate(arr):
		r[i + 1] = r[i] + el
	return r

def divideCeil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
t = 1
t = int(input())
for _ in range(t):
	(r, b, k) = li()
	if r > b:
		(r, b) = (b, r)
	if b % r != 0 and r - gcd(r, b) > r - b % r:
		x = (b - 1) // r + 1
	else:
		x = (b - 1) // r
	if x >= k:
		print('REBEL')
	else:
		print('OBEY')


import sys
import math
from collections import defaultdict, Counter, deque
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
t = int(input())
for i in range(t):
	(r, b, k) = map(int, input().split())
	if r > b:
		(r, b) = (b, r)
	g = math.gcd(r, b)
	if b - r * (k - 1) > g:
		print('REBEL')
	else:
		print('OBEY')


def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
T = int(input())
for _ in range(T):
	(r, b, k) = map(int, input().split())
	(r, b) = (min(r, b), max(r, b))
	if gcd(r, b) + r * (k - 1) < b:
		print('REBEL')
	else:
		print('OBEY')


import math
t = int(input())
for _ in range(t):
	(r, b, k) = map(int, input().split())
	d = math.gcd(r, b)
	r //= d
	b //= d
	if r > b:
		(r, b) = (b, r)
	if b - 1 >= r * k - r + 1:
		print('REBEL')
	else:
		print('OBEY')


n = int(input())

def gcd(x, y):
	while x != 0 and y != 0:
		(x, y) = (max(x, y), min(x, y))
		x %= y
	return max(x, y)
for i in range(n):
	(r, b, k) = list(map(int, input().split()))
	g = gcd(r, b)
	(r, b) = (max(r, b) // g, min(r, b) // g)
	if r % b == 0 and r // b - 1 < k or (r % b == 1 and r // b < k) or (r % b > 1 and r // b + 1 < k):
		print('OBEY')
	else:
		print('REBEL')


import math
n = int(input())
for _ in range(n):
	(a, b, k) = map(int, input().split())
	if a < b:
		min = a
		max = b
	else:
		min = b
		max = a
	if max % min == 0:
		if max // min - 1 >= k:
			print('REBEL')
		else:
			print('OBEY')
	elif min == 2:
		if max // min >= k:
			print('REBEL')
		else:
			print('OBEY')
	else:
		g = math.gcd(min, max)
		min = min // g
		max = max // g
		if max % min == 1:
			if max // min >= k:
				print('REBEL')
			else:
				print('OBEY')
		elif max // min + 1 >= k:
			print('REBEL')
		else:
			print('OBEY')


import math
T = int(input())
for t in range(T):
	(r, b, k) = map(int, input().split())
	if r == b:
		print('OBEY')
	else:
		if r > b:
			(r, b) = (b, r)
		lcm = r // math.gcd(r, b) * b
		(x, y) = (lcm // r - 1, lcm // b)
		res = x // y
		if x % y != 0:
			res += 1
		if res >= k:
			print('REBEL')
		else:
			print('OBEY')


def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
import math
t = int(input())
for __ in range(t):
	(r, b, k) = list(map(int, input().split()))
	gcd_rb = gcd(r, b)
	r_n = r // gcd_rb
	b_n = b // gcd_rb
	if r_n < b_n:
		(r_n, b_n) = (b_n, r_n)
	streak = math.ceil((r_n - 1) / b_n)
	if streak < k:
		print('OBEY')
	else:
		print('REBEL')


from math import gcd
n = int(input())
for _ in range(n):
	(r, b, k) = map(int, input().split())
	g = gcd(r, b)
	r //= g
	b //= g
	if (r + b - 2) // b >= k:
		print('REBEL')
	elif (b + r - 2) // r >= k:
		print('REBEL')
	else:
		print('OBEY')


from math import *
for i in range(int(input())):
	(a, b, k) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	(a, b) = (a / gcd(a, b), b / gcd(a, b))
	if ceil((b - 1) / a) >= k:
		print('REBEL')
	else:
		print('OBEY')


from math import gcd
import math

def answer():
	(r, b, k) = map(int, input().split(' '))
	if r == b:
		return 'OBEY'
	(r, b) = sorted([r, b])
	g = gcd(r, b)
	l = r * b // g
	r /= g
	b /= g
	if b - r == 1 or b % r == 0:
		if b % r == 0:
			max_renzoku = b // r - 1
		else:
			max_renzoku = b // r
	else:
		max_renzoku = int(math.ceil((b - 1) / r))
	if max_renzoku < k:
		return 'OBEY'
	else:
		return 'REBEL'
n = int(input())
for _ in range(n):
	print(answer())


import math
t = int(input())
for i in range(t):
	(r, b, k) = map(int, input().split())
	q = math.gcd(b, r)
	b //= q
	r //= q
	if r < b:
		(b, r) = (r, b)
	if (r - 2) // b + 1 >= k:
		print('REBEL')
	else:
		print('OBEY')


from math import gcd
for i in range(int(input())):
	(r, b, k) = map(int, input().split())
	if r > b:
		(r, b) = (b, r)
	t = r * b // gcd(r, b)
	t -= 1
	m = t // r // (t // b + 1)
	if t // r % (t // b + 1):
		m += 1
	if k <= m:
		print('REBEL')
	else:
		print('OBEY')


import math
n = int(input())
for i in range(n):
	(r, b, k) = map(int, input().split(' '))
	t = math.gcd(r, b)
	r = int(r / t)
	b = int(b / t)
	if r > b:
		(r, b) = (b, r)
	if (k - 1) * r + 1 < b:
		print('Rebel')
	else:
		print('Obey')


t = int(input())
import math
for i in range(t):
	(a, b, k) = map(int, input().split())
	if a == b:
		print('obey')
	elif a == 1 or b == 1:
		if max(a, b) - 1 >= k:
			print('rebel')
		else:
			print('obey')
	else:
		gcd = math.gcd(a, b)
		(a, b) = (a // gcd, b // gcd)
		(a, b) = (max(a, b), min(a, b))
		if (a - 1 + (b - 1)) // b >= k:
			print('rebel')
		else:
			print('obey')


import sys
input = lambda : sys.stdin.readline().rstrip()

def gcd(x, y):
	while y != 0:
		r = x % y
		x = y
		y = r
	return x
T = int(input())
for _ in range(T):
	(r, b, k) = map(int, input().split())
	if r < b:
		(r, b) = (b, r)
	g = gcd(r, b)
	r = r / g
	b = b / g
	if b * (k - 1) + 1 >= r:
		print('OBEY')
	else:
		print('REBEL')


import sys
input = sys.stdin.readline
t = int(input())
import math
for testcases in range(t):
	(r, b, k) = map(int, input().split())
	x = math.gcd(r, b)
	r //= x
	b //= x
	if 1 + min(r, b) * (k - 1) < max(r, b):
		print('REBEL')
	else:
		print('OBEY')


import sys
from math import gcd
reader = (map(int, s.split()) for s in sys.stdin)
(t,) = next(reader)
for _ in range(t):
	(r, b, k) = next(reader)
	if r > b:
		(r, b) = (b, r)
	g = gcd(r, b)
	seq = (b - g - 1) // r + 1
	print('OBEY' if seq < k else 'REBEL')


import math
for _ in range(int(input())):
	(r, b, k) = map(int, input().split())
	(r, b) = (min(r, b), max(r, b))
	j = math.gcd(r, b)
	if (b - 2 - j + 1) // r >= k - 1:
		print('REBEL')
	else:
		print('OBEY')


import sys
import math
t = int(sys.stdin.readline())
for _ in range(t):
	(r, b, k) = map(int, sys.stdin.readline().split())
	a = math.gcd(r, b)
	r = r // a
	b = b // a
	if r > b:
		if (k - 1) * b + 1 >= r:
			print('OBEY')
		else:
			print('REBEL')
	elif (k - 1) * r + 1 >= b:
		print('OBEY')
	else:
		print('REBEL')


t = int(input())

def gcd(a, b):
	while not (a == 0 or b == 0):
		if a < b:
			(a, b) = (b, a)
		a %= b
	return a + b
for i in range(t):
	(r, b, k) = map(int, input().split())
	g = gcd(r, b)
	if r > b:
		(r, b) = (b, r)
	r //= g
	b //= g
	val = (k - 1) * r + 1
	if val < b:
		print('REBEL')
	else:
		print('OBEY')


import math
for _ in range(int(input())):
	(r, b, k) = map(int, input().split())
	xx = min(r, b)
	yy = max(r, b)
	if yy % xx == 0:
		req = yy // xx - 1
	else:
		req = yy // xx
	z = math.gcd(xx, yy)
	zz = xx // z - 1
	if zz > ((req + 1) * xx - yy) // z:
		req += 1
	if req >= k:
		print('REBEL')
	else:
		print('OBEY')


from math import gcd
t = int(input())
ans = list()
for kek in range(t):
	(r, b, k) = list(map(int, input().split()))
	if r == b:
		ans.append('OBEY')
		continue
	c = gcd(r, b)
	if c == r or c == b:
		if max(b, r) // c - 1 < k:
			ans.append('OBEY')
			continue
		else:
			ans.append('REBEL')
			continue
	r //= c
	b //= c
	R = max(r, b)
	L = min(r, b)
	x = R // L
	R -= x * L
	if R > 1:
		x += 1
	if x >= k:
		ans.append('REBEL')
		continue
	else:
		ans.append('OBEY')
for i in range(t):
	print(ans[i])


from math import *
from collections import *
import sys
sys.setrecursionlimit(10 ** 9)
n = int(input())
for y in range(n):
	(r, b, k) = map(int, input().split())
	lcm = r * b // gcd(r, b)
	r1 = lcm // r
	b1 = lcm // b
	if r1 > b1:
		s = (r1 - 1) / b1
	else:
		s = (b1 - 1) / r1
	if s > k - 1:
		print('Rebel')
	else:
		print('Obey')


from math import *
t = int(input())
for z in range(t):
	(r, b, k) = map(int, input().split())
	ma = max(r, b)
	mi = min(r, b)
	ans = ceil(ma / mi)
	a = ma % mi
	if a != 0 and mi % a != 0:
		ans += 1
	if k < ans:
		print('REBEL')
	else:
		print('OBEY')


import math
for _ in range(int(input())):
	(a, b, k) = map(int, input().split())
	maxi = max(a, b)
	mini = min(a, b)
	g = math.gcd(maxi, mini)
	maxi = maxi // g
	mini = mini // g
	if (k - 1) * mini + 1 < maxi:
		print('REBEL')
	else:
		print('OBEY')


def gcd(a, b):
	if a < b:
		(a, b) = (b, a)
	while b:
		(a, b) = (b, a % b)
	return a

def f():
	(r, b, k) = [int(s) for s in input().split()]
	if r > b:
		(r, b) = (b, r)
	g = gcd(r, b)
	r //= g
	b //= g
	rangeLen = r * (k - 1) + 1
	if rangeLen <= b - 1:
		print('REBEL')
	else:
		print('OBEY')
n = int(input())
for i in range(n):
	f()


from math import *
t = int(input())
ans = []
for _ in range(t):
	(r, b, k) = map(int, input().split())
	p = ceil((max(r, b) - gcd(r, b)) / min(r, b))
	if p >= k:
		ans.append('Rebel')
	else:
		ans.append('Obey')
print(*ans, sep='\n')


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def solve():
	import sys
	T = int(input())
	while T > 0:
		rbk = sys.stdin.readline().split()
		r = int(rbk[0])
		b = int(rbk[1])
		k = int(rbk[2])
		if r == b:
			print('OBEY')
		else:
			mx = max(r, b)
			mn = min(r, b)
			g = gcd(mx, mn)
			if g > 1:
				mx = mx / g
				mn = mn / g
			if 1 + (k - 1) * mn < mx:
				print('REBEL')
			else:
				print('OBEY')
		T -= 1
solve()


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
n = int(input())
for i in range(n):
	(r, b, k) = map(int, input().split())
	if b > r:
		(r, b) = (b, r)
	(r, b) = (r // gcd(r, b), b // gcd(r, b))
	if (r + b - 2) // b >= k:
		print('REBEL')
	else:
		print('OBEY')


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
M = 10 ** 9 + 7
EPS = 1e-06

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
for _ in range(Int()):
	(a, b, k) = value()
	(a, b) = sorted((a, b))
	lcm = a * b // gcd(a, b)
	c_a = lcm // a - 1
	c_b = lcm // b
	d_k = ceil(c_a / c_b)
	ok = 1
	if d_k >= k:
		ok = 0
	if a == b:
		ok = 1
	if ok:
		print('OBEY')
	else:
		print('REBEL')


from math import gcd
t = int(input())
for _ in range(t):
	(r, b, k) = (int(x) for x in input().split(' '))
	g = gcd(r, b)
	if (k - 1) * min(r / g, b / g) + 1 >= max(r / g, b / g):
		print('OBEY')
	else:
		print('REBEL')


from math import gcd
for _ in range(int(input())):
	(a, b, k) = map(int, input().split())
	g = gcd(a, b)
	a /= g
	b /= g
	if a < b:
		(a, b) = (b, a)
	if (a + b - 2) // b >= k:
		print('REBEL')
	else:
		print('OBEY')


for t in range(int(input())):
	(r, b, k) = map(int, input().split())
	if b > r:
		(b, r) = (r, b)
	if r == b:
		print('OBEY')
	elif r % b == 0:
		if r // b <= k:
			print('OBEY')
		else:
			print('REBEL')
	elif r % (r % b) == 0 and b % (r % b) == 0:
		if r // b < k:
			print('OBEY')
		else:
			print('REBEL')
	elif r // b + 1 < k:
		print('OBEY')
	else:
		print('REBEL')


t = int(input())

def ext_gcd(p, q):
	if q == 0:
		return (p, 1, 0)
	(g, y, x) = ext_gcd(q, p % q)
	y -= p // q * x
	return (g, x, y)
for _ in range(t):
	(r, b, k) = map(int, input().split())
	ponta = ext_gcd(r, b)[0]
	if ponta <= b - 1 - (k - 1) * r or ponta <= r - 1 - (k - 1) * b:
		print('REBEL')
	else:
		print('OBEY')


import sys
import math
n = int(input())
for i in range(n):
	(r, b, k) = map(int, input().split())
	if r > b:
		(r, b) = (b, r)
	lcm = r * b // math.gcd(r, b)
	if (b - math.gcd(r, b) - 1) // r + 1 >= k:
		print('REBEL')
	else:
		print('OBEY')


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log2, ceil
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from bisect import insort
from collections import Counter
from collections import deque
from heapq import heappush, heappop, heapify
from itertools import permutations, combinations
mod = int(1000000000.0) + 7
ip = lambda : int(stdin.readline())
inp = lambda : map(int, stdin.readline().split())
ips = lambda : stdin.readline().rstrip()
out = lambda x: stdout.write(str(x) + '\n')
t = ip()
for _ in range(t):
	(r, b, k) = inp()
	g = gcd(r, b)
	r = r // g
	b = b // g
	if r > b:
		(r, b) = (b, r)
	if (k - 1) * r + 1 >= b:
		ans = 'OBEY'
	else:
		ans = 'REBEL'
	out(ans)


import math
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	a = 0
	b = 0
	if x > y:
		a = y
		b = x
	else:
		a = x
		b = y
	freq = 0
	res = b - math.gcd(a, b)
	if res == 0:
		freq = 1
	elif res % a == 0:
		freq = res // a
	else:
		freq = res // a + 1
	if freq >= k:
		print('REBEl')
	else:
		print('OBEY')


import sys
input = sys.stdin.readline

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
t = int(input())
for testcase in range(t):
	(r, b, k) = map(int, input().split())
	if r == b:
		print('OBEY')
		continue
	if r < b:
		(r, b) = (b, r)
	g = gcd(r, b)
	if r > (k - 1) * b + g:
		print('REBEL')
	else:
		print('OBEY')


import math
T = int(input())
for i in range(T):
	(r, b, k) = map(int, input().split())
	if r == b:
		print('OBEY')
		continue
	if r > b:
		tem = r
		r = b
		b = tem
	gicd = math.gcd(r, b)
	out = int((b + r - gicd - 1) / r)
	if out >= k:
		print('REBEL')
	else:
		print('OBEY')


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def main():
	(a, b, k) = map(int, input().split())
	if a == b:
		print('OBEY')
		return
	(l, m) = (min(a, b), max(a, b))
	d = gcd(a, b)
	diff = m - d
	c = int(diff / l) + 1
	if diff % l == 0:
		c = c - 1
	if c >= k:
		print('REBEL')
	else:
		print('OBEY')
T = int(input())
for _ in range(T):
	main()


from __future__ import division, print_function

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def main():
	import sys
	data = iter(map(int, sys.stdin.buffer.read().decode('ascii').split()))
	n = next(data)
	res = [None] * n
	for i in range(n):
		(r, b, k) = (next(data), next(data), next(data))
		g = gcd(r, b)
		r //= g
		b //= g
		(r, b) = (min(r, b), max(r, b))
		res[i] = 'OBEY' if b <= r * (k - 1) + 1 else 'REBEL'
	sys.stdout.buffer.write('\n'.join((str(x) for x in res)).encode('ascii'))
	return 0
main()


import math
for i in range(int(input())):
	(r, g, k) = map(int, input().split())
	t = math.gcd(r, g)
	r //= t
	g //= t
	if r >= g:
		(r, g) = (g, r)
	if (k - 1) * r + 1 >= g:
		print('OBEY')
	else:
		print('REBEL')


from math import gcd
for q in range(int(input())):
	(r, b, k) = map(int, input().split())
	(r, b) = (min(r, b), max(r, b))
	print('REBEL' if r * (k - 1) + gcd(r, b) < b else 'OBEY')


import math
import os
import sys

def main():
	T = read_int()
	for _ in range(T):
		print('OBEY' if solve(*read_ints()) else 'REBEL')

def solve(R, B, K):
	if R > B:
		(R, B) = (B, R)
	g = math.gcd(R, B)
	R //= g
	B //= g
	return (B - 2 + R) // R < K
DEBUG = 'DEBUG' in os.environ

def inp():
	return sys.stdin.readline().rstrip()

def read_int():
	return int(inp())

def read_ints():
	return [int(e) for e in inp().split()]

def dprint(*value, sep=' ', end='\n'):
	if DEBUG:
		print(*value, sep=sep, end=end)
main()


import sys
from fractions import gcd

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7
for _ in range(INT()):
	(r, b, k) = MAP()
	(r, b) = (min(r, b), max(r, b))
	d = gcd(r, b)
	r //= d
	b //= d
	if ceil(b - 1, r) < k:
		print('OBEY')
	else:
		print('REBEL')


def main():
	import sys
	from fractions import gcd
	input = sys.stdin.readline
	t = int(input())
	for _ in range(t):
		(r, b, k) = map(int, input().split())
		if r > b:
			(r, b) = (b, r)
		g = gcd(r, b)
		r //= g
		b //= g
		if (b - 2) // r + 1 >= k:
			print('REBEL')
		else:
			print('OBEY')
main()


import math
for _ in range(int(input())):
	(r, b, k) = map(int, input().split())
	div = math.ceil((max(r, b) - math.gcd(r, b)) / min(r, b))
	if div < k:
		print('OBEY')
	else:
		print('REBEL')


import sys
import math
T = int(input())
for _ in range(T):
	(r, b, k) = map(int, input().split())
	(r, b) = (min(r, b), max(r, b))
	gc = math.gcd(r, b)
	t = (k - 1) * r
	if gc + t >= b:
		print('OBEY')
	else:
		print('REBEL')


n = int(input())

def gcd(a, b):
	if b > a:
		ob = b
		b = a
		a = ob
	if b == 0:
		return a
	return gcd(a % b, b)
for i in range(0, n):
	ln = [int(j) for j in input().split(' ')]
	b = ln[0]
	r = ln[1]
	k = ln[2]
	if b > r:
		ob = b
		b = r
		r = ob
	pd = gcd(r, b)
	nm = (r - pd) // b
	if (r - pd) % b != 0:
		nm += 1
	if nm >= k:
		print('REBEL')
	else:
		print('OBEY')


def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
t = int(input())
for nt in range(t):
	(r, b, k) = map(int, input().split())
	(r, b) = (max(r, b), min(r, b))
	if r == b:
		print('OBEY')
	elif (r - 1) // b >= k:
		print('REBEL')
	else:
		hcf = gcd(r, b)
		if (r - 1 + (b - hcf)) // b >= k:
			print('REBEL')
		else:
			print('OBEY')


from sys import stdin, setrecursionlimit
setrecursionlimit(10 ** 7)

def iin():
	return int(stdin.readline())

def lin():
	return list(map(int, stdin.readline().split()))
from math import gcd

def lcm(a, b):
	return a * b // gcd(a, b)

def main():
	t = iin()
	while t:
		t -= 1
		(r, b, k) = lin()
		if r > b:
			(r, b) = (b, r)
		if r * k == b or r * (k - 1) >= b or (r * k > b and b % r * (lcm(r, b) // b) <= r):
			print('OBEY')
		else:
			print('REBEL')
main()


import math
from math import gcd as gc
for _ in range(int(input())):
	(a, b, k) = map(int, input().split())
	(a, b) = (min(a, b), max(a, b))
	g = gc(a, b)
	if (b - 1 - g) // a >= k - 1:
		print('REBEL')
	else:
		print('OBEY')


from math import gcd

def solve(r, b, k):
	g = gcd(r, b)
	r //= g
	b //= g
	if r > b:
		(r, b) = (b, r)
	if (k - 1) * r + 1 < b:
		return 'REBEL'
	return 'OBEY'
for _ in range(int(input())):
	(R, B, K) = [int(i) for i in input().split()]
	print(solve(R, B, K))


t = int(input())
from math import gcd
for i in range(t):
	(r, b, k) = map(int, input().split())
	if max(r, b) % min(r, b) == 0:
		if max(r, b) // min(r, b) - 1 >= k:
			print('REBEL')
		else:
			print('OBEY')
	else:
		a = max(r, b)
		b = min(r, b)
		g = gcd(a, b)
		x = a // b
		if g + x * b <= a - 1:
			x += 1
		if x >= k:
			print('REBEL')
		else:
			print('OBEY')


def func_name(input1, input2):
	while input2:
		(input1, input2) = (input2, input1 % input2)
	return input1
counter = 0
T = int(input())
for i in range(T):
	temp = input().split()
	input1 = int(temp[counter])
	input2 = int(temp[counter + 1])
	input3 = int(temp[counter + 2])
	if input1 > input2:
		temp_value = input1
		input1 = input2
		input2 = temp_value
	if input3 - 1 > (input2 - 2 * func_name(input1, input2)) / input1:
		print('OBEY')
	else:
		print('REBEL')


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
n = int(input())
for _ in range(n):
	(a, b, k) = map(int, input().split())
	d = gcd(a, b)
	a = a // d
	b = b // d
	mx = max(a, b)
	mn = min(a, b)
	if mn * (k - 1) >= mx - 1:
		print('OBEY')
	else:
		print('REBEL')


import math
n = int(input())
for i in range(n):
	(x, y, k) = map(int, input().split())
	if x > y:
		(x, y) = (y, x)
	p = math.gcd(x, y)
	z = (y - p) / x
	if z <= k - 1:
		print('OBEY')
	else:
		print('REBEL')


import math

def findNum(N, K):
	rem = (N + K) % K
	if rem == 0:
		return N
	else:
		return N + K - rem

def cmmmc(a, b):
	return a * b // math.gcd(a, b)

def ok(a, b, k):
	if a > b:
		(a, b) = (b, a)
	g = math.gcd(a, b)
	cnt = (b - g - 1) // a + 1
	if cnt < 0:
		cnt = 0
	if cnt >= k:
		return False
	return True
t = int(input())
for _ in range(t):
	[a, b, k] = list(map(int, input().split()))
	res = ok(a, b, k)
	print('OBEY' if res else 'REBEL')


from math import gcd
q = int(input())
for i in range(q):
	(w, e, r) = map(int, input().split())
	nok = w * e // gcd(w, e)
	(w, e) = sorted((w, e))
	a = nok // w - 1
	b = nok // e
	(a, b) = sorted((a, b))
	if a == 0:
		if b - 1 == 0:
			print('OBEY')
		else:
			print('REBEL')
	elif (b - 1) // a + 1 >= r:
		print('REBEL')
	else:
		print('OBEY')


def gcd(a, b):
	while b != 0:
		temp = a % b
		a = b
		b = temp
	return abs(a)
for _ in range(int(input())):
	(r, b, k) = map(int, input().split())
	(r, b) = (min(r, b), max(r, b))
	g = gcd(r, b)
	r //= g
	b //= g
	x = (b - 2) // r + 1
	if x >= k:
		print('REBEL')
	else:
		print('OBEY')


from fractions import gcd
n = int(input())
for i in range(n):
	(r, b, k) = list(map(int, input().split()))
	_gcd = gcd(r, b)
	mn = min(r, b) / _gcd
	mx = max(r, b) / _gcd
	if mx - 1 > mn * (k - 1):
		print('REBEL')
	else:
		print('OBEY')


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator, bisect, fractions, statistics
from collections import deque, defaultdict, OrderedDict, Counter
from fractions import Fraction
from decimal import Decimal
from sys import stdout
from heapq import heappush, heappop, heapify, _heapify_max, _heappop_max, nsmallest, nlargest

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	tc = ri()
	for _ in range(tc):
		(r, b, k) = ria()
		(r, b) = (min(r, b), max(r, b))
		g = math.gcd(r, b)
		r = r // g
		b = b // g
		if (k - 1) * r + 1 < b:
			print('REBEL')
		else:
			print('OBEY')
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


def gcd(x, y):
	if x == 0:
		return y
	elif y == 0:
		return x
	elif x > y:
		return gcd(x % y, y)
	else:
		return gcd(x, y % x)
t = int(input())
for i in range(t):
	(r, b, k) = map(int, input().split())
	if r == b:
		print('obey')
	else:
		(r, b) = (r / gcd(r, b), b / gcd(r, b))
		if b * (k - 1) <= r - 2 or r * (k - 1) <= b - 2:
			print('rebel')
		else:
			print('obey')


def gcd(a, b):
	return a if b == 0 else gcd(b, a % b)
t = int(input())
for case_num in range(t):
	(r, b, k) = map(int, input().split(' '))
	if r > b:
		tmp = r
		r = b
		b = tmp
	g = gcd(r, b)
	b = b // g
	r = r // g
	n = (b - 2) // r + 1 if b % r != 0 else b // r - 1
	print('REBEL' if n >= k else 'OBEY')


import math

def P1():
	t = int(input())
	for _ in range(t):
		(r, b, k) = map(int, input().split())
		g = math.gcd(r, b)
		r /= g
		b /= g
		if r > b:
			(r, b) = (b, r)
		print('REBEL' if b > (k - 1) * r + 1 else 'OBEY')
P1()


from math import gcd
t = int(input())
for i in range(t):
	(a, b, k) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	bei = a * b // gcd(a, b)
	cnt_b = bei // b
	cnt_a = bei // a - 1
	res = cnt_a // cnt_b
	if cnt_a % cnt_b != 0:
		res += 1
	if res < k:
		print('OBEY')
	else:
		print('REBEL')


from sys import stdin
from math import gcd

def solve():
	for _ in range(int(stdin.readline())):
		(r, b, k) = map(int, stdin.readline().split())
		if r > b:
			(r, b) = (b, r)
		g = gcd(r, b)
		if (k - 1) * r + g < b:
			print('REBEL')
		else:
			print('OBEY')
solve()


T = int(input())

def gcd(a, b):
	if a > b:
		(a, b) = (b, a)
	if b % a == 0:
		return a
	return gcd(a, b % a)
for case in range(T):
	(r, b, k) = list(map(int, input().split()))
	if r > b:
		(r, b) = (b, r)
	if k * r < b:
		print('REBEL')
	elif (k - 1) * r >= b:
		print('OBEY')
	else:
		g = gcd(r, b)
		if g == r:
			print('OBEY')
		elif g + r * (k - 1) < b:
			print('REBEL')
		else:
			print('OBEY')


t = int(input())

def gcd(x, y):
	while y % x != 0:
		r = y % x
		(x, y) = (r, x)
	return x
for i in range(t):
	(r, b, k) = list(map(int, input().split()))
	l = max(r, b)
	s = min(r, b)
	d = gcd(s, l)
	x = l // d - 1
	if (x + s // d - 1) // (s // d) >= k:
		print('REBEL')
	else:
		print('OBEY')


t = int(input())
import math
for _ in range(t):
	(a, b, k) = map(int, input().split())
	if a < b:
		(a, b) = (b, a)
	if a == b:
		p = 1
	elif a % b == 0:
		p = a // b - 1
	else:
		q = math.gcd(a, b)
		a //= q
		b //= q
		p = math.ceil((a - 1) / b)
	if p >= k:
		print('REBEL')
	else:
		print('OBEY')


n = int(input())

def m(x, y):
	a = max(x, y)
	b = min(x, y)
	while a != b:
		c = a % b
		a = b
		b = c
		if c == 0:
			break
	return a
for i in range(n):
	(r, b, k) = [int(x) for x in input().split(' ')]
	a = m(r, b)
	x = max(r, b)
	y = min(r, b)
	if 2 * x % y != 0:
		if x >= (k - 1) * y + 2 * a:
			print('REBEL')
		else:
			print('OBEY')
	elif x % y == 0:
		if x >= (k + 1) * y:
			print('REBEL')
		else:
			print('OBEY')
	elif x >= k * y + a:
		print('REBEL')
	else:
		print('OBEY')


import math
t = int(input())
for _ in range(t):
	(r, b, k) = list(map(int, input().split()))
	if r == b:
		print('OBEY')
	else:
		x = r * b // math.gcd(r, b)
		if x == r or x == b:
			z = x // min(r, b)
			if z - 1 < k:
				print('OBEY')
			else:
				print('REBEL')
		else:
			temp = math.gcd(r, b)
			r = r // temp
			b = b // temp
			c = math.ceil((max(r, b) - 1) / min(r, b))
			if c < k:
				print('OBEY')
			else:
				print('REBEL')


import sys
from collections import defaultdict as dd
import heapq
import math
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
input = sys.stdin.readline
for i in range(int(input())):
	(r, b, k) = map(int, input().split())
	e = math.gcd(r, b)
	a = min(r, b)
	b = max(r, b) - 1 - e
	if k > b // a + 1:
		print('obey')
	else:
		print('rebel')


import math

def lcm(c, d):
	return d * c // math.gcd(c, d)
for _ in range(int(input())):
	(a, b, k) = map(int, input().split())
	l = lcm(a, b)
	p = l // a - 1
	q = l // b - 1
	pr = math.ceil(max(p, q) / (min(p, q) + 1))
	print('OBEY' if pr < k else 'REBEL')


def solve():
	from math import gcd
	(r, y, k) = map(int, input().split())
	b = max(r, y)
	a = min(r, y)
	c = b - gcd(a, b) - 1
	x = 1 + c // a
	if x >= k:
		print('REBEL')
	else:
		print('OBEY')
t = eval(input())
for i in range(t):
	solve()


def rint():
	return int(input())

def rints():
	return list(map(int, input().split()))
from math import gcd
t = rint()
for _ in range(t):
	(r, b, k) = rints()
	if r == b:
		print('OBEY')
		continue
	g = gcd(r, b)
	r //= g
	b //= g
	if r < b:
		(r, b) = (b, r)
	print('REBEL' if (r - 2) // b + 1 >= k else 'OBEY')


from math import gcd
n = int(input())
for i in range(n):
	(r, b, k) = list(map(int, input().split()))
	if r == b:
		print('OBEY')
		continue
	if r < b:
		(r, b) = (b, r)
	g = gcd(r, b)
	m = 1 + (r - g - 1) // b
	if m >= k:
		print('REBEL')
	else:
		print('OBEY')


import math
n = int(input())
qqq = []
for iiii in range(n):
	a = [x for x in input().split()]
	r = min(int(a[0]), int(a[1]))
	b = max(int(a[1]), int(a[0]))
	k = int(a[2])
	yan = 1
	d = math.gcd(r, b)
	b /= d
	r /= d
	if b >= (k - 1) * r + 2:
		yan = 0
	if yan == 1:
		qqq.append('OBEY')
	else:
		qqq.append('REBEL')
for i in qqq:
	print(i)


from math import gcd
for i in range(int(input())):
	(r, b, k) = map(int, input().split())
	g = gcd(r, b)
	r //= g
	b //= g
	if r > b:
		(r, b) = (b, r)
	if (k - 1) * r + 1 < b:
		print('rebel')
	else:
		print('obey')


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
t = int(input())
for _ in range(t):
	(r, b, k) = map(int, input().split())
	mini = min(r, b)
	maxi = max(r, b)
	gg = gcd(mini, maxi)
	mini = mini // gg
	maxi = maxi // gg
	if (k - 1) * mini + 1 < maxi:
		print('REBEL')
	else:
		print('OBEY')


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
t = int(input())
for i in range(t):
	(b, r, k) = map(int, input().split())
	if (max(b, r) - gcd(b, r) + min(b, r) - 1) // min(b, r) < k:
		print('OBEY')
	else:
		print('REBEL')


from math import gcd
t = int(input())
for _ in range(t):
	(r, b, k) = map(int, input().split())
	if r > b:
		temp = r
		r = b
		b = temp
	r1 = r // gcd(r, b)
	b1 = b // gcd(r, b)
	if (k - 1) * r1 + 1 < b1:
		print('REBEL')
	else:
		print('OBEY')


from fractions import gcd
for i in range(int(input())):
	(r, b, k) = map(int, input().split())
	x = max(r, b)
	y = min(r, b)
	d = gcd(x, y)
	x //= d
	y //= d
	if (k - 1) * y + 1 <= x - 1:
		print('ReBeL')
	else:
		print('ObEy')


import sys
from fractions import gcd
input = sys.stdin.readline
t = int(input())
for i in range(t):
	(r, b, k) = [int(item) for item in input().split()]
	if r > b:
		(r, b) = (b, r)
	g = gcd(r, b)
	maxima = (b - g + r - 1) // r
	if maxima >= k:
		print('REBEL')
	else:
		print('OBEY')


def nod(x, y):
	if x < y:
		return nod(y, x)
	elif x % y == 0:
		return y
	else:
		return nod(y, x % y)
import math
t = int(input())
for _ in range(t):
	(r, b, k) = map(int, input().split())
	if r < b:
		x = r
		y = b
		r = y
		b = x
	if r == b:
		print('OBEY')
	else:
		d = nod(r, b)
		div = math.floor((r - 1) / d)
		y = math.floor(b / d)
		z = 0
		if not div % y == 0:
			z = 1
		if math.floor(div / y) + z < k:
			print('OBEY')
		else:
			print('REBEL')


from sys import stdin
from math import gcd

def rounddown(a, b):
	c = a // b
	if b * c == a:
		c -= 1
	return c

def find(a, b, k):
	start = gcd(a, b)
	great = 1 + (b - start - 1) // a
	if great >= k:
		print('REBEL')
	else:
		print('OBEY')
with stdin as fin:
	q = int(fin.readline().rstrip())
	for i in range(q):
		[a, b, k] = [int(i) for i in fin.readline().rstrip().split()]
		if a > b:
			c = a
			a = b
			b = c
		find(a, b, k)


import math
t = int(input())
for _ in range(t):
	(r, b, k) = map(int, input().split())
	if r > b:
		(r, b) = (b, r)
	g = math.gcd(r, b)
	b = b // g
	r = r // g
	if (k - 1) * r + 1 < b:
		print('rebel')
	else:
		print('obey')


def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
x = eval(input())
for i in range(x):
	y = input().split(' ')
	g = gcd(int(y[0]), int(y[1]))
	a = min(int(y[0]), int(y[1])) / g
	b = max(int(y[0]), int(y[1])) / g
	c = int(y[2])
	if (b - 1) // a + 1 > c:
		print('REBEL')
	elif (b - 1) // a + 1 == c and (b - 1) % a != 0:
		print('REBEL')
	else:
		print('OBEY')


def gcd(x, y):
	while y != 0:
		(x, y) = (y, x % y)
	return x

def main():
	t = int(input())
	allans = []
	for _ in range(t):
		(r, b, k) = readIntArr()
		if r > b:
			temp = r
			r = b
			b = temp
		g = gcd(r, b)
		binn = 10 ** 9
		maxRebelK = 1
		start = g
		while binn > 0:
			while start + r * (maxRebelK - 1 + binn) < b:
				maxRebelK += binn
			binn //= 2
		if k > maxRebelK:
			allans.append('OBEY')
		else:
			allans.append('REBEL')
	multiLineArrayPrint(allans)
	return
import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')

def oneLineArrayPrint(arr):
	print(' '.join([str(x) for x in arr]))

def multiLineArrayPrint(arr):
	print('\n'.join([str(x) for x in arr]))

def multiLineArrayOfArraysPrint(arr):
	print('\n'.join([' '.join([str(x) for x in y]) for y in arr]))

def readIntArr():
	return [int(x) for x in input().split()]

def makeArr(defaultVal, dimensionArr):
	dv = defaultVal
	da = dimensionArr
	if len(da) == 1:
		return [dv for _ in range(da[0])]
	else:
		return [makeArr(dv, da[1:]) for _ in range(da[0])]

def queryInteractive(x, y):
	print('? {} {}'.format(x, y))
	sys.stdout.flush()
	return int(input())

def answerInteractive(ans):
	print('! {}'.format(ans))
	sys.stdout.flush()
inf = float('inf')
MOD = 10 ** 9 + 7
for _abc in range(1):
	main()


import math
T = int(input())
for t in range(T):
	(r, b, k) = [int(x) for x in input().split()]
	gcd = math.gcd(r, b)
	rr = r // gcd
	bb = b // gcd
	x = max(rr, bb)
	y = min(rr, bb)
	w = (x - 1) // y
	if (x - 1) % y != 0:
		w += 1
	if w == 0:
		w = 1
	if w < k:
		print('OBEY')
	else:
		print('REBEL')


import math
t = int(input())
for _ in range(t):
	(a, b, k) = map(int, input().split())
	maxi = max(a, b)
	mini = min(a, b)
	dif = maxi % mini
	x = maxi // mini
	if dif != 0:
		if mini % dif != 0:
			x += 1
	if a * b // math.gcd(maxi, mini) == maxi:
		x -= 1
	if x >= k:
		print('REBEL')
	else:
		print('OBEY')


from math import gcd, ceil

def lcm(a, b):
	return a * b // gcd(a, b)
t = int(input())
for _ in range(0, t):
	(r, b, k) = map(int, input().split())
	(rr, bb) = sorted([r, b])
	lc = lcm(rr, bb)
	(nr, nb) = (lc // rr - 1, lc // bb)
	if ceil(nr / nb) >= k:
		print('REBEL')
	else:
		print('OBEY')


import math
t = int(input())
for i in range(t):
	(r, b, k) = map(int, input().split())
	(r, b) = (max(r, b), min(r, b))
	n = math.ceil((r - math.gcd(r, b)) / b)
	if n >= k:
		print('REBEL')
	else:
		print('OBEY')


import sys
input = sys.stdin.readline
from math import gcd
t = int(input())
for _ in range(t):
	(r, b, k) = map(int, input().split())
	g = gcd(r, b)
	r //= g
	b //= g
	if min(r, b) * (k - 1) + 2 > max(r, b):
		print('OBEY')
	else:
		print('REBEL')


def hcf(a, b):
	if a % b == 0:
		return b
	return hcf(b, a % b)

def lcm(a, b):
	return a * b // hcf(a, b)
t = int(input())
for i in range(t):
	(a, b, k) = map(int, input().split())
	p = lcm(a, b)
	q = hcf(a, b)
	if k >= p:
		print('OBEY')
	elif a == b:
		print('OBEY')
	else:
		g = a
		l = b
		if b > a:
			g = b
			l = a
		if (g - q) % l == 0 and (g - q) // l < k:
			print('OBEY')
		elif (g - q) % l != 0 and (g - q) // l + 1 < k:
			print('OBEY')
		else:
			print('REBEL')


import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def gcd(u, v):
	while v:
		(u, v) = (v, u % v)
	return u

def solve():
	(r, b, k) = nm()
	if r > b:
		(r, b) = (b, r)
	g = gcd(r, b)
	r //= g
	b //= g
	print('REBEL' if (b - 2) // r + 1 >= k else 'OBEY')
	return
T = ni()
for _ in range(T):
	solve()


def gcd(a: int, b: int) -> int:
	if b == 0:
		return a
	return gcd(b, a % b)
t = int(input())
for _ in range(t):
	(a, b, k) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	gcd_ab = gcd(a, b)
	tmp = a % gcd_ab + gcd_ab
	if -(-(b - tmp) // a) < k:
		print('OBEY')
	else:
		print('REBEL')


from math import gcd
for _ in range(int(input())):
	(r, b, k) = map(int, input().split())
	(MIN, MAX) = (min(r, b), max(r, b))
	GCD = gcd(MAX, MIN)
	x = (MAX - GCD - 1) // MIN
	x += 1
	if x >= k:
		print('REBEL')
	else:
		print('OBEY')


from math import ceil, gcd
t = int(input().strip())
for _ in range(t):
	(r, b, k) = map(int, input().split())
	if r > b:
		(r, b) = (b, r)
	if ceil((b - gcd(r, b)) / r) < k:
		print('OBEY')
	else:
		print('REBEL')


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans

def check(x, y, k):
	rem = y - (k - 1) * x - 1
	if rem <= 0:
		return 0
	min_rem = math.gcd(x, y)
	if min_rem <= rem:
		return 1
	else:
		return 0
t = int(input())
for tt in range(t):
	(a, b, k) = map(int, sys.stdin.readline().split(' '))
	if check(a, b, k) or check(b, a, k):
		print('REBEL')
	else:
		print('OBEY')
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


import math

def case():
	(r, b, k) = map(int, input().split())
	(r, b) = (min(r, b), max(r, b))
	g = math.gcd(r, b)
	if math.ceil((b - g) / r) >= k:
		print('REBEL')
	else:
		print('OBEY')
for _ in range(int(input())):
	case()


def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return abs(a)
N = int(input())
for _ in range(N):
	(a, b, k) = list(map(int, input().split()))
	g = gcd(a, b)
	mi = min(a, b)
	ma = max(a, b)
	A = ma // g - 1
	B = mi // g
	if B * (k - 1) < A:
		print('REBEL')
	else:
		print('OBEY')


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
t = int(input())
for _ in range(t):
	(r, b, k) = map(int, input().split())
	g = gcd(r, b)
	r //= g
	b //= g
	(r, b) = (min(r, b), max(r, b))
	if ceil((b - 1) / r) >= k:
		print('REBEL')
	else:
		print('OBEY')


def divisors(M):
	d = []
	i = 1
	while M >= i ** 2:
		if M % i == 0:
			d.append(i)
			if i ** 2 != M:
				d.append(M // i)
		i = i + 1
	return d

def popcount(x):
	x = x - (x >> 1 & 1431655765)
	x = (x & 858993459) + (x >> 2 & 858993459)
	x = x + (x >> 4) & 252645135
	x = x + (x >> 8)
	x = x + (x >> 16)
	return x & 127

def eratosthenes(n):
	res = [0 for i in range(n + 1)]
	prime = set([])
	for i in range(2, n + 1):
		if not res[i]:
			prime.add(i)
			for j in range(1, n // i + 1):
				res[i * j] = 1
	return prime

def factorization(n):
	res = []
	for p in prime:
		if n % p == 0:
			while n % p == 0:
				n //= p
			res.append(p)
	if n != 1:
		res.append(n)
	return res

def euler_phi(n):
	res = n
	for x in range(2, n + 1):
		if x ** 2 > n:
			break
		if n % x == 0:
			res = res // x * (x - 1)
			while n % x == 0:
				n //= x
	if n != 1:
		res = res // n * (n - 1)
	return res

def ind(b, n):
	res = 0
	while n % b == 0:
		res += 1
		n //= b
	return res

def isPrimeMR(n):
	d = n - 1
	d = d // (d & -d)
	L = [2, 3, 5, 7, 11, 13, 17]
	for a in L:
		t = d
		y = pow(a, t, n)
		if y == 1:
			continue
		while y != n - 1:
			y = y * y % n
			if y == 1 or t == n - 1:
				return 0
			t <<= 1
	return 1

def findFactorRho(n):
	from math import gcd
	m = 1 << n.bit_length() // 8
	for c in range(1, 99):
		f = lambda x: (x * x + c) % n
		(y, r, q, g) = (2, 1, 1, 1)
		while g == 1:
			x = y
			for i in range(r):
				y = f(y)
			k = 0
			while k < r and g == 1:
				ys = y
				for i in range(min(m, r - k)):
					y = f(y)
					q = q * abs(x - y) % n
				g = gcd(q, n)
				k += m
			r <<= 1
		if g == n:
			g = 1
			while g == 1:
				ys = f(ys)
				g = gcd(abs(x - ys), n)
		if g < n:
			if isPrimeMR(g):
				return g
			elif isPrimeMR(n // g):
				return n // g
			return findFactorRho(g)

def primeFactor(n):
	i = 2
	ret = {}
	rhoFlg = 0
	while i * i <= n:
		k = 0
		while n % i == 0:
			n //= i
			k += 1
		if k:
			ret[i] = k
		i += 1 + i % 2
		if i == 101 and n >= 2 ** 20:
			while n > 1:
				if isPrimeMR(n):
					(ret[n], n) = (1, 1)
				else:
					rhoFlg = 1
					j = findFactorRho(n)
					k = 0
					while n % j == 0:
						n //= j
						k += 1
					ret[j] = k
	if n > 1:
		ret[n] = 1
	if rhoFlg:
		ret = {x: ret[x] for x in sorted(ret)}
	return ret

def divisors(n):
	res = [1]
	prime = primeFactor(n)
	for p in prime:
		newres = []
		for d in res:
			for j in range(prime[p] + 1):
				newres.append(d * p ** j)
		res = newres
	res.sort()
	return res

def xorfactorial(num):
	if num == 0:
		return 0
	elif num == 1:
		return 1
	elif num == 2:
		return 3
	elif num == 3:
		return 0
	else:
		x = baseorder(num)
		return 2 ** x * ((num - 2 ** x + 1) % 2) + function(num - 2 ** x)

def xorconv(n, X, Y):
	if n == 0:
		res = [X[0] * Y[0] % mod]
		return res
	x = [X[i] + X[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	y = [Y[i] + Y[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	z = [X[i] - X[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	w = [Y[i] - Y[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	res1 = xorconv(n - 1, x, y)
	res2 = xorconv(n - 1, z, w)
	former = [(res1[i] + res2[i]) * inv for i in range(2 ** (n - 1))]
	latter = [(res1[i] - res2[i]) * inv for i in range(2 ** (n - 1))]
	former = list(map(lambda x: x % mod, former))
	latter = list(map(lambda x: x % mod, latter))
	return former + latter

def merge_sort(A, B):
	(pos_A, pos_B) = (0, 0)
	(n, m) = (len(A), len(B))
	res = []
	while pos_A < n and pos_B < m:
		(a, b) = (A[pos_A], B[pos_B])
		if a < b:
			res.append(a)
			pos_A += 1
		else:
			res.append(b)
			pos_B += 1
	res += A[pos_A:]
	res += B[pos_B:]
	return res

class UnionFindVerSize:

	def __init__(self, N):
		self._parent = [n for n in range(0, N)]
		self._size = [1] * N
		self.group = N

	def find_root(self, x):
		if self._parent[x] == x:
			return x
		self._parent[x] = self.find_root(self._parent[x])
		stack = [x]
		while self._parent[stack[-1]] != stack[-1]:
			stack.append(self._parent[stack[-1]])
		for v in stack:
			self._parent[v] = stack[-1]
		return self._parent[x]

	def unite(self, x, y):
		gx = self.find_root(x)
		gy = self.find_root(y)
		if gx == gy:
			return
		self.group -= 1
		if self._size[gx] < self._size[gy]:
			self._parent[gx] = gy
			self._size[gy] += self._size[gx]
		else:
			self._parent[gy] = gx
			self._size[gx] += self._size[gy]

	def get_size(self, x):
		return self._size[self.find_root(x)]

	def is_same_group(self, x, y):
		return self.find_root(x) == self.find_root(y)

class WeightedUnionFind:

	def __init__(self, N):
		self.parent = [i for i in range(N)]
		self.size = [1 for i in range(N)]
		self.val = [0 for i in range(N)]
		self.flag = True
		self.edge = [[] for i in range(N)]

	def dfs(self, v, pv):
		stack = [(v, pv)]
		new_parent = self.parent[pv]
		while stack:
			(v, pv) = stack.pop()
			self.parent[v] = new_parent
			for (nv, w) in self.edge[v]:
				if nv != pv:
					self.val[nv] = self.val[v] + w
					stack.append((nv, v))

	def unite(self, x, y, w):
		if not self.flag:
			return
		if self.parent[x] == self.parent[y]:
			self.flag = self.val[x] - self.val[y] == w
			return
		if self.size[self.parent[x]] > self.size[self.parent[y]]:
			self.edge[x].append((y, -w))
			self.edge[y].append((x, w))
			self.size[x] += self.size[y]
			self.val[y] = self.val[x] - w
			self.dfs(y, x)
		else:
			self.edge[x].append((y, -w))
			self.edge[y].append((x, w))
			self.size[y] += self.size[x]
			self.val[x] = self.val[y] + w
			self.dfs(x, y)

class Dijkstra:

	class Edge:

		def __init__(self, _to, _cost):
			self.to = _to
			self.cost = _cost

	def __init__(self, V):
		self.G = [[] for i in range(V)]
		self._E = 0
		self._V = V

	@property
	def E(self):
		return self._E

	@property
	def V(self):
		return self._V

	def add_edge(self, _from, _to, _cost):
		self.G[_from].append(self.Edge(_to, _cost))
		self._E += 1

	def shortest_path(self, s):
		import heapq
		que = []
		d = [10 ** 15] * self.V
		d[s] = 0
		heapq.heappush(que, (0, s))
		while len(que) != 0:
			(cost, v) = heapq.heappop(que)
			if d[v] < cost:
				continue
			for i in range(len(self.G[v])):
				e = self.G[v][i]
				if d[e.to] > d[v] + e.cost:
					d[e.to] = d[v] + e.cost
					heapq.heappush(que, (d[e.to], e.to))
		return d

def Z_algorithm(s):
	N = len(s)
	Z_alg = [0] * N
	Z_alg[0] = N
	i = 1
	j = 0
	while i < N:
		while i + j < N and s[j] == s[i + j]:
			j += 1
		Z_alg[i] = j
		if j == 0:
			i += 1
			continue
		k = 1
		while i + k < N and k + Z_alg[k] < j:
			Z_alg[i + k] = Z_alg[k]
			k += 1
		i += k
		j -= k
	return Z_alg

class BIT:

	def __init__(self, n, mod=0):
		self.BIT = [0] * (n + 1)
		self.num = n
		self.mod = mod

	def query(self, idx):
		res_sum = 0
		mod = self.mod
		while idx > 0:
			res_sum += self.BIT[idx]
			if mod:
				res_sum %= mod
			idx -= idx & -idx
		return res_sum

	def update(self, idx, x):
		mod = self.mod
		while idx <= self.num:
			self.BIT[idx] += x
			if mod:
				self.BIT[idx] %= mod
			idx += idx & -idx
		return

class dancinglink:

	def __init__(self, n, debug=False):
		self.n = n
		self.debug = debug
		self._left = [i - 1 for i in range(n)]
		self._right = [i + 1 for i in range(n)]
		self.exist = [True for i in range(n)]

	def pop(self, k):
		if self.debug:
			assert self.exist[k]
		L = self._left[k]
		R = self._right[k]
		if L != -1:
			if R != self.n:
				(self._right[L], self._left[R]) = (R, L)
			else:
				self._right[L] = self.n
		elif R != self.n:
			self._left[R] = -1
		self.exist[k] = False

	def left(self, idx, k=1):
		if self.debug:
			assert self.exist[idx]
		res = idx
		while k:
			res = self._left[res]
			if res == -1:
				break
			k -= 1
		return res

	def right(self, idx, k=1):
		if self.debug:
			assert self.exist[idx]
		res = idx
		while k:
			res = self._right[res]
			if res == self.n:
				break
			k -= 1
		return res

class SparseTable:

	def __init__(self, A, merge_func, ide_ele):
		N = len(A)
		n = N.bit_length()
		self.table = [[ide_ele for i in range(n)] for i in range(N)]
		self.merge_func = merge_func
		for i in range(N):
			self.table[i][0] = A[i]
		for j in range(1, n):
			for i in range(0, N - 2 ** j + 1):
				f = self.table[i][j - 1]
				s = self.table[i + 2 ** (j - 1)][j - 1]
				self.table[i][j] = self.merge_func(f, s)

	def query(self, s, t):
		b = t - s + 1
		m = b.bit_length() - 1
		return self.merge_func(self.table[s][m], self.table[t - 2 ** m + 1][m])

class BinaryTrie:

	class node:

		def __init__(self, val):
			self.left = None
			self.right = None
			self.max = val

	def __init__(self):
		self.root = self.node(-10 ** 15)

	def append(self, key, val):
		pos = self.root
		for i in range(29, -1, -1):
			pos.max = max(pos.max, val)
			if key >> i & 1:
				if pos.right is None:
					pos.right = self.node(val)
					pos = pos.right
				else:
					pos = pos.right
			elif pos.left is None:
				pos.left = self.node(val)
				pos = pos.left
			else:
				pos = pos.left
		pos.max = max(pos.max, val)

	def search(self, M, xor):
		res = -10 ** 15
		pos = self.root
		for i in range(29, -1, -1):
			if pos is None:
				break
			if M >> i & 1:
				if xor >> i & 1:
					if pos.right:
						res = max(res, pos.right.max)
					pos = pos.left
				else:
					if pos.left:
						res = max(res, pos.left.max)
					pos = pos.right
			elif xor >> i & 1:
				pos = pos.right
			else:
				pos = pos.left
		if pos:
			res = max(res, pos.max)
		return res

def solveequation(edge, ans, n, m):
	x = [0] * m
	used = [False] * n
	for v in range(n):
		if used[v]:
			continue
		y = dfs(v)
		if y != 0:
			return False
	return x

	def dfs(v):
		used[v] = True
		r = ans[v]
		for (to, dire, id) in edge[v]:
			if used[to]:
				continue
			y = dfs(to)
			if dire == -1:
				x[id] = y
			else:
				x[id] = -y
			r += y
		return r

class SegmentTree:

	def __init__(self, init_val, segfunc, ide_ele):
		n = len(init_val)
		self.segfunc = segfunc
		self.ide_ele = ide_ele
		self.num = 1 << (n - 1).bit_length()
		self.tree = [ide_ele] * 2 * self.num
		self.size = n
		for i in range(n):
			self.tree[self.num + i] = init_val[i]
		for i in range(self.num - 1, 0, -1):
			self.tree[i] = self.segfunc(self.tree[2 * i], self.tree[2 * i + 1])

	def update(self, k, x):
		k += self.num
		self.tree[k] = x
		while k > 1:
			self.tree[k >> 1] = self.segfunc(self.tree[k], self.tree[k ^ 1])
			k >>= 1

	def query(self, l, r):
		if r == self.size:
			r = self.num
		res = self.ide_ele
		l += self.num
		r += self.num
		while l < r:
			if l & 1:
				res = self.segfunc(res, self.tree[l])
				l += 1
			if r & 1:
				res = self.segfunc(res, self.tree[r - 1])
			l >>= 1
			r >>= 1
		return res

	def bisect_l(self, l, r, x):
		l += self.num
		r += self.num
		Lmin = -1
		Rmin = -1
		while l < r:
			if l & 1:
				if self.tree[l] <= x and Lmin == -1:
					Lmin = l
				l += 1
			if r & 1:
				if self.tree[r - 1] <= x:
					Rmin = r - 1
			l >>= 1
			r >>= 1
		if Lmin != -1:
			pos = Lmin
			while pos < self.num:
				if self.tree[2 * pos] <= x:
					pos = 2 * pos
				else:
					pos = 2 * pos + 1
			return pos - self.num
		elif Rmin != -1:
			pos = Rmin
			while pos < self.num:
				if self.tree[2 * pos] <= x:
					pos = 2 * pos
				else:
					pos = 2 * pos + 1
			return pos - self.num
		else:
			return -1
import sys, random, bisect
from collections import deque, defaultdict
from heapq import heapify, heappop, heappush
from itertools import permutations
from math import gcd, log
input = lambda : sys.stdin.readline().rstrip()
mi = lambda : map(int, input().split())
li = lambda : list(mi())
for _ in range(int(input())):
	(r, b, k) = mi()
	if r < b:
		(r, b) = (b, r)
	if r == b:
		print('OBEY')
	else:
		g = gcd(r, b)
		check = g + b * (k - 1)
		if check < r:
			print('REBEL')
		else:
			print('OBEY')


t = int(input())

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
for _ in range(t):
	(r, b, k) = map(int, input().split())
	if r > b:
		(r, b) = (b, r)
	g = gcd(b, r)
	b /= g
	r /= g
	x = (b - 1 + r - 1) // r
	if x <= k - 1:
		print('OBEY')
	else:
		print('REBEL')


from math import gcd
t = int(input())
for i in range(t):
	(r, b, k) = [int(x) for x in input().split()]
	if b > r:
		(b, r) = (r, b)
	g = gcd(r, b)
	c = (r - g - 1) // b + 1
	if c >= k:
		print('REBEL')
	else:
		print('OBEY')


import math
t = int(input())
for i in range(t):
	(r, b, k) = tuple(map(int, input().split()))
	if r > b:
		(r, b) = (b, r)
	a = math.gcd(r, b)
	r = r // a
	b = b // a
	if (k - 1) * r + 1 < b:
		print('REBEL')
	else:
		print('OBEY')


import math
T = int(input())
for t in range(T):
	(r, b, k) = list(map(int, input().split()))
	mini = min(r, b)
	maxi = max(r, b)
	g = math.gcd(mini, maxi)
	mini /= g
	maxi /= g
	res = (k - 1) * mini + 1 < maxi
	if res:
		print('REBEL')
	else:
		print('OBEY')


from math import gcd
N = int(input())
for n in range(N):
	(r, b, k) = map(int, input().strip().split())
	if b < r:
		(r, b) = (b, r)
	if r * (k - 1) + gcd(r, b) < b:
		print('REBEL')
	else:
		print('OBEY')


import math

def lcd(a, b):
	return a * b // math.gcd(a, b)
n = int(input())
for i in range(n):
	(r, b, k) = [int(x) for x in input().split()]
	if r < b:
		tmp = r
		r = b
		b = tmp
	a = lcd(r, b) // b - 1
	br = lcd(r, b) // r
	if a > (k - 1) * br:
		print('REBEL')
	else:
		print('OBEY')


import math
n = int(input())
for i in range(n):
	(r, b, k) = list(map(int, input().split()))
	g = math.gcd(r, b)
	r = r // g
	b = b // g
	if k > (max(r, b) - 2) // min(r, b) + 1:
		print('OBEY')
	else:
		print('REBEL')


import math
from math import gcd
import sys

def input():
	return sys.stdin.readline().rstrip()

def slv():
	(r, b, k) = map(int, input().split())
	g = gcd(r, b)
	r //= g
	b //= g
	(r, b) = (min(r, b), max(r, b))
	if r == b == k == 1:
		print('REBEL')
		return
	if (b - 2) // r + 1 >= k:
		print('REBEL')
	else:
		print('OBEY')
	return

def main():
	t = int(input())
	for i in range(t):
		slv()
	return
main()


import math
for _ in range(int(input())):
	l = list(map(int, input().split()))
	if l[0] < l[1]:
		(l[0], l[1]) = (l[1], l[0])
	temp = math.gcd(l[0], l[1])
	if l[0] - (l[2] - 1) * l[1] > temp:
		print('REBEL')
	else:
		print('OBEY')


from math import gcd
t = int(input())
for _ in range(t):
	(r, b, k) = list(map(int, input().split()))
	(r, b) = sorted([r, b])
	a = gcd(r, b)
	x = (b - a - 1) // r + 1
	print('REBEL' if x >= k else 'OBEY')


import math
for j in range(int(input())):
	(r, b, k) = [int(i) for i in input().split()]
	g = math.gcd(r, b)
	(r, b) = (min(r, b) // g, max(r, b) // g)
	(d, m) = divmod(b, r)
	print('OBEY' if d + (m > 1) - (m < 1) < k else 'REBEL')


import math
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
N = int(input())
for _ in range(N):
	(r, b, t) = map(int, input().split())
	(r, b) = (min(r, b), max(r, b))
	gc = gcd(b, r)
	r //= gc
	b //= gc
	if 1 + (t - 1) * r < b:
		print('REBEL')
	else:
		print('OBEY')


import math
q = int(input())
for i in range(q):
	(r, b, k) = map(int, input().split(' '))
	g = math.gcd(r, b)
	x = r * b // g
	if r > b:
		tmp = r
		r = b
		b = tmp
	t1 = b // g - 1
	t2 = r // g
	if math.ceil(t1 / t2) < k:
		print('OBEY')
	else:
		print('REBEL')


import sys

class IoTool:
	DEBUG = 0

	def _reader_dbg():
		with open('./input.txt', 'r') as f:
			lines = f.readlines()
		for l in lines:
			yield l.strip()

	def _reader_oj():
		return iter(sys.stdin.read().split('\n'))
	reader = _reader_dbg() if DEBUG else _reader_oj()

	def read():
		return next(IoTool.reader)
input = IoTool.read

def gcd(a, b):
	return a if b == 0 else gcd(b, a % b)

def main():
	(r, b, k) = map(int, input().split())
	g = gcd(r, b)
	(r, b) = (min(r, b), max(r, b))
	if g + (k - 1) * r < b:
		print('REBEL')
	else:
		print('OBEY')
n = int(input())
for _ in range(n):
	main()


import math

def infinite_fence(a, b, k):
	if a > b:
		(a, b) = (b, a)
	g = math.gcd(a, b)
	a /= g
	b /= g
	if (k - 1) * a + 1 < b:
		return 'REBEL'
	return 'OBEY'
t = int(input())
for _ in range(t):
	[a, b, k] = map(int, input().split())
	result = infinite_fence(a, b, k)
	print(result)


import sys
from math import *
import builtins
import string
alphabets = list(string.ascii_lowercase)
ALPHABETS = list(string.ascii_uppercase)

def print(x, end='\n'):
	sys.stdout.write(str(x) + end)

def get_int():
	return int(input())

def get_list_ints():
	return list(map(int, input().split()))

def get_char_list():
	s = input()
	return list(s[:len(s)])

def get_tuple_ints():
	return tuple(map(int, input().split()))

def print_iterable(p):
	print(' '.join(map(str, p)))

def binary_search(arr, x):
	low = 0
	high = len(arr) - 1
	mid = 0
	while low <= high:
		mid = (high + low) // 2
		if arr[mid] < x:
			low = mid + 1
		elif arr[mid] > x:
			high = mid - 1
		else:
			return mid
	return high

def main():
	p = get_int()
	for q in range(p):
		(r, b, k) = get_list_ints()
		d = gcd(r, b)
		r = r // d
		b = b // d
		if r > b:
			(r, b) = (b, r)
		if (k - 1) * r + 1 < b:
			print('REBEL')
		else:
			print('OBEY')
	pass
main()


import sys, os, io
input = sys.stdin.readline
PI = 3.141592653589793
INF = float('inf')
MOD = 1000000007

def bin32(num):
	return '{0:032b}'.format(num)

def add(x, y):
	return (x + y) % MOD

def sub(x, y):
	return (x - y + MOD) % MOD

def mul(x, y):
	return x * y % MOD

def gcd(x, y):
	if y == 0:
		return x
	return gcd(y, x % y)

def lcm(x, y):
	return x * y // gcd(x, y)

def power(x, y):
	res = 1
	x %= MOD
	while y != 0:
		if y & 1:
			res = mul(res, x)
		y >>= 1
		x = mul(x, x)
	return res

def mod_inv(n):
	return power(n, MOD - 2)

def prob(p, q):
	return mul(p, power(q, MOD - 2))

def ii():
	return int(input())

def li():
	return [int(i) for i in input().split()]

def ls():
	return [i for i in input().split()]
for t in range(ii()):
	t += 1
	(r, b, k) = li()
	(r, b) = (r // gcd(r, b), b // gcd(r, b))
	(r, b) = (min(r, b), max(r, b))
	if b % r == 0:
		x = b // r - 1
		if x >= k:
			print('REBEL')
		else:
			print('OBEY')
	elif r * (k - 1) < b - 1:
		print('REBEL')
	else:
		print('OBEY')


import sys
import math

def read_line():
	return sys.stdin.readline()[:-1]

def read_int():
	return int(sys.stdin.readline())

def read_int_line():
	return [int(v) for v in sys.stdin.readline().split()]

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
t = read_int()
for i in range(t):
	(r, b, k) = read_int_line()
	f = True
	d = gcd(r, b)
	(r, b) = (min(r, b), max(r, b))
	if d == 1:
		if (k - 1) * r >= b - 1:
			f = False
	else:
		r = r // d
		b = b // d
		if (k - 1) * r >= b - 1:
			f = False
	if not f:
		print('OBEY')
	else:
		print('REBEL')


import math

def fact(n):
	ans = []
	while n % 2 == 0:
		ans.append(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0 and n != 1:
			ans.append(i)
			n = n // i
	if n > 2:
		ans.append(n)
	return ans
a = int(input())
for i in range(a):
	(r, b, k) = map(int, input().split())
	(r, b) = (min(r, b), max(r, b))
	if r == b:
		print('OBEY')
		continue
	x = b
	a1 = fact(x)
	a2 = fact(r)
	from collections import defaultdict
	al2 = defaultdict(int)
	for i in range(len(a2)):
		al2[a2[i]] += 1
	for i in range(len(a1)):
		if al2[a1[i]] >= 1:
			al2[a1[i]] -= 1
			x = x // a1[i]
			r = r // a1[i]
	x -= 1
	if x % r == 0:
		control = x // r
	else:
		control = x // r + 1
	if control >= k:
		print('REBEL')
	else:
		print('OBEY')


from math import ceil
from math import floor
from math import sqrt
from math import log
from sys import stdout
prime = pow(10, 9) + 7

def mod_expo(n, p, m):
	result = 1
	while p != 0:
		if p % 2 == 1:
			result = result * n % m
		p //= 2
		n = n * n % m
	return result

def find_sequences(n):
	result = []
	if n <= 3:
		return result
	while n > 5:
		result.append('24 * 1 = 24')
		result.append(str(n) + ' - ' + str(n - 1) + ' = 1')
		n -= 2
	result.reverse()
	if n == 4:
		result.insert(0, '1 + 2 = 3')
		result.insert(1, '3 + 3 = 6')
		result.insert(2, '4 * 6 = 24')
	elif n == 5:
		result.insert(0, '1 + 4 = 5')
		result.insert(1, '5 * 5 = 25')
		result.insert(2, '25 - 3 = 22')
		result.insert(3, '22 + 2 = 24')
	return result

def check(n, k):
	v = 0
	left = n
	while left > 0:
		current = min(left, k)
		v += current
		left -= current
		left -= left // 10
	return 2 * v >= n

def get_pair_count(n, arr):
	count = 0
	mp = {}
	for i in range(n):
		if arr[i] not in mp:
			mp[arr[i]] = 0
		mp[arr[i]] += 1
	for i in range(n):
		for deg in range(1, 31):
			val = pow(2, deg) - arr[i]
			if val in mp:
				count += mp[val]
				if val == arr[i]:
					count -= 1
		mp[arr[i]] -= 1
	return count

def find_bsearch(n):
	left = 1
	right = n
	middle = 0
	if n <= 2:
		return 1
	while left < right:
		middle = left + (right - left) // 2
		if check(n, middle):
			if middle == left or not check(n, middle - 1):
				return middle
			right = middle - 1
		else:
			left = middle + 1
	return left

def count_resistors(a, b):
	level = -1
	while b:
		(cont, a) = divmod(a, b)
		level += cont
		(a, b) = (b, a)
	if a == 1:
		return level + 1
	return -1

def get_moves_count(n):
	s = 0
	j = 1
	for i in range(3, n + 1, 2):
		s += 4 * (i - 1) * j
		j += 1
	return s

def find_index(n):
	i = 2
	fibo = [0, 1]
	while True:
		fibo.append(fibo[i - 1] + fibo[i - 2])
		if fibo[i] == n:
			return i - 2
		if fibo[i] > n:
			return i - 3
		i += 1

def primeFactors(n):
	factors = []
	while n % 2 == 0:
		factors.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			factors.append(i)
			n = n / i
	if n > 2:
		factors.append(n)
	factors = set(factors)
	print(factors)

def get_ideal_playlist(n, k, songs):
	mx = 0
	pref_sum = []
	pref_sum.append(0)
	songs.sort(key=lambda x: x[1])
	for i in range(1, n + 1):
		pref_sum.append(songs[i - 1][0] + pref_sum[i - 1])
	for i in range(1, n + 1):
		current = pref_sum[min(n, i + k - 1)]
		if i > 0:
			current -= pref_sum[i - 1]
		current *= songs[i - 1][1]
		mx = max(mx, current)
	return mx

def gcd(m, n):
	if n == 0:
		return m
	return gcd(n, m % n)

def lcm(m, n):
	return m * n / gcd(m, n)

def should_obey(r, b, k):
	if b < r:
		(b, r) = (r, b)
	g = gcd(r, b)
	r /= g
	b /= g
	return (k - 1) * r + 1 >= b

def find_dig(n):
	mn = 10
	mx = -1
	while n > 0:
		mn = min(mn, n % 10)
		mx = max(mx, n % 10)
		n //= 10
	return [mn, mx]

def operate(n, k):
	for i in range(2, k + 1):
		dig = find_dig(n)
		if dig[0] == 0:
			return n
		n = n + dig[0] * dig[1]
	return n

def find_petya_wins(N, S):
	total = S
	arr = []
	for i in range(n - 1):
		arr.append(S // N)
		total -= S // N
	arr.append(total)
	if S // N > 1 and total > 1:
		print('YES')
		print(*arr, sep=' ')
		print(1)
	else:
		print('NO')

def find_max_candies(n, a, b, p, q):
	A = n // a
	B = n // b
	C = int(n // lcm(a, b))
	mx = 0
	if q >= p:
		return p * (A - C) + q * B
	return p * A + q * (B - C)
t = 1
t = int(input())
while t:
	t = t - 1
	count = 0
	(r, b, k) = map(int, input().split())
	songs = []
	if should_obey(r, b, k):
		print('OBEY')
	else:
		print('REBEL')


import sys
from math import gcd
sys.setrecursionlimit(10 ** 5 + 1)
inf = int(10 ** 20)
max_val = inf
min_val = -inf
RW = lambda : sys.stdin.readline().strip()
RI = lambda : int(RW())
RMI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
RWI = lambda : [x for x in sys.stdin.readline().strip().split()]
for _ in range(RI()):
	(red, blue, limit) = RMI()
	(re, bl) = (max(red, blue), min(red, blue))
	gc_d = gcd(re, bl)
	re //= gc_d
	bl //= gc_d
	print('REBEL' if (limit - 1) * bl + 1 <= re - 1 else 'OBEY')


from fractions import gcd

def main():
	T = int(input())
	for _ in range(T):
		(r, b, k) = map(int, input().split())
		if r > b:
			(r, b) = (b, r)
		g = gcd(r, b)
		r //= g
		b //= g
		m = (b - 1 + (r - 1)) // r
		if m < k:
			print('OBEY')
		else:
			print('REBEL')
main()


t = int(input())
from math import gcd
for _ in range(t):
	(a, b, c) = map(int, input().split())
	g = gcd(a, b)
	a //= g
	b //= g
	mx = max(a, b)
	mn = min(a, b)
	if mn * (c - 1) >= mx - 1:
		print('OBEY')
	else:
		print('REBEL')


def euc(a, b):
	while b != 0:
		(a, b) = (b, a % b)
	return a
for _ in range(int(input())):
	(r, b, k) = map(int, input().split())
	if r == b:
		print('OBEY')
		continue
	(r, b) = (min(r, b), max(r, b))
	if b % r == 0:
		if b // r - 1 < k:
			print('OBEY')
		else:
			print('REBEL')
		continue
	a = euc(b, r)
	b //= a
	r //= a
	if r * k - (r - 1) >= b:
		print('OBEY')
		continue
	print('REBEL')


import sys
from fractions import gcd
input = sys.stdin.readline
N = int(input())
for _ in range(N):
	(a, b, c) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	if (b - gcd(a, b)) % a == 0:
		c += 1
	if (b - gcd(a, b)) // a >= c - 1:
		print('REBEL')
	else:
		print('OBEY')


def gcd(a, c):
	while a and c:
		if a > c:
			(a, c) = (c, a)
		c %= a
	return a + c
for i in range(int(input())):
	(r, b, k) = map(int, input().split())
	if r > b:
		(r, b) = (b, r)
	g = gcd(r, b)
	(r, b) = (r // g, b // g)
	print('REBEL' if (k - 1) * r + 1 < b else 'OBEY')


t = int(input())

def gwc(r, b):
	while r % b:
		(r, b) = (b, r % b)
	return b
for j in range(t):
	(r, b, k) = [int(i) for i in input().split()]
	if r < b:
		(r, b) = (b, r)
	c = gwc(r, b)
	(r, b) = (r // c, b // c)
	if r % b == 0 and r // b <= k:
		print('OBEY')
	elif r > b * (k - 1) + 1:
		print('REBEL')
	else:
		print('OBEY')


from math import ceil, gcd
n = int(input())
for _ in range(n):
	(r, b, k) = [int(i) for i in input().split()]
	to_divide = gcd(r, b)
	r /= to_divide
	b /= to_divide
	max_planks = max(ceil((r - 1) / b), ceil((b - 1) / r))
	if max_planks >= k:
		print('Rebel')
	else:
		print('Obey')


import math
n = int(input())
for _ in range(n):
	ans = 0
	(r, b, k) = map(int, input().split())
	if b > r:
		(r, b) = (b, r)
	g = math.gcd(r, b)
	(r, b) = (r // g, b // g)
	cc = math.ceil((r - 1) / b)
	if k <= cc:
		print('REBEL')
	else:
		print('OBEY')


def nod(a, b):
	(a, b) = (min(a, b), max(a, b))
	while a > 0:
		(a, b) = (b % a, a)
	return b
n = int(input())
for i in range(n):
	(r, b, k) = [int(i) for i in input().split()]
	(r, b) = (max(r, b), min(r, b))
	if (k - 1) * b + nod(b, r) >= r:
		print('OBEY')
	else:
		print('REBEL')


import math
t = int(input())
ans = []
for _ in range(t):
	(r, b, k) = map(int, input().split())
	gcd = math.gcd(r, b)
	(h, l) = (max(r, b), min(r, b))
	if (h - gcd + l - 1) // l >= k:
		ans.append('REBEL')
	else:
		ans.append('OBEY')
print('\n'.join(ans))


from math import gcd, ceil
t = int(input())
for _ in range(t):
	(r, b, k) = map(int, input().split())
	g = gcd(r, b)
	r //= g
	b //= g
	if r > b:
		(r, b) = (b, r)
	result = ceil((b - 1) / r)
	if result < k:
		print('OBEY')
	else:
		print('REBEL')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)

def toord(c):
	return ord(c) - ord('a')
mod = 998244353
INF = float('inf')
from math import factorial, sqrt, ceil, floor, gcd
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

def lcm(a, b):
	return a * b // lcm(a, b)

def main():
	(rb, ob) = ('REBEL', 'OBEY')
	for _ in range(N()):
		(r, b, k) = RL()
		gd = gcd(r, b)
		if r > b:
			(r, b) = (b, r)
		if b <= (k - 1) * r + gd:
			print(ob)
		else:
			print(rb)
main()


from math import gcd
t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	(a, b) = sorted([a, b])
	if a == b:
		print('OBEY')
		continue
	if b == 1:
		print('OBEY')
		continue
	x = gcd(a, b)
	di = (b - x - 1) // a + 1
	if di >= c:
		print('REBEL')
	else:
		print('OBEY')
	continue


from math import ceil

def gcd(a, b):
	while a != 0 and b != 0:
		if a > b:
			a %= b
		else:
			b %= a
	return a + b
t = int(input())
for kkk in range(t):
	(a, b, k) = map(int, input().split())
	if a == b:
		print('OBEY')
	else:
		g = gcd(a, b)
		a //= g
		b //= g
		(a, b) = (max(a, b), min(a, b))
		kk = (a - 1) // b + (1 if (a - 1) % b != 0 else 0)
		if kk >= k:
			print('REBEL')
		else:
			print('OBEY')


from math import gcd, ceil
t = int(input())
for _ in range(t):
	(r, b, k) = list(map(int, input().split()))
	(r, b) = (r // gcd(b, r), b // gcd(b, r))
	if ceil((max(b, r) - 1) / min(b, r)) >= k:
		print('REBEL')
	else:
		print('OBEY')


def getGCD(a, b):
	if a == 0 or b == 0:
		return max(a, b)
	if a > b:
		return getGCD(a % b, b)
	return getGCD(b % a, a)
n = int(input())
for i in range(n):
	(r, b, k) = map(int, input().split())
	bCopy = b
	b = max(b, r)
	r = min(r, bCopy)
	if (b - getGCD(r, b) - 1) // r + 1 >= k:
		print('REBEL')
	else:
		print('OBEY')


import sys
from math import gcd

def rint():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline().rstrip('\n')

def oint():
	return int(input())
T = oint()
for _ in range(T):
	(r, b, k) = rint()
	lcm = r * b // gcd(r, b)
	bb = lcm // b - 1
	rr = lcm // r - 1
	aa1 = max(bb, rr)
	aa2 = min(bb, rr)
	aa = aa1 // (aa2 + 1)
	aar = aa1 % (aa2 + 1)
	if aar:
		aa += 1
	if aa < k:
		print('OBEY')
	else:
		print('REBEL')


from math import *
for _ in range(int(input())):
	(r, b, k) = map(int, input().split())
	(r, b) = (max(r, b), min(r, b))
	g = gcd(r, b)
	f = r - g
	ans = ceil(f / b)
	if ans < k:
		print('OBEY')
	else:
		print('REBEL')


def evkl(a, b):
	if b == 0:
		return a
	else:
		return evkl(b, a % b)
n = int(input())
for i in range(n):
	(a, b, k) = map(int, input().split())
	if a < b:
		(a, b) = (b, a)
	num = evkl(a, b)
	a //= num
	b //= num
	if a - 1 < (k - 1) * b + 1:
		print('OBEY')
	else:
		print('REBEL')


import math
T = int(input())
for kase in range(T):
	(a, b, k) = [int(x) for x in input().split()]
	g = math.gcd(a, b)
	a = a // g
	b = b // g
	if a > b:
		(a, b) = (b, a)
	if (b - 1) % a == 0:
		mx = (b - 1) / a
	else:
		mx = (b - 1) / a + 1
	if mx < k:
		print('OBEY')
	else:
		print('REBEL')


t = int(input())
for i in range(t):
	(r, b, k) = list(map(int, input().split()))
	if r > b:
		temp = r
		r = b
		b = temp
	a = b // r
	c = b % r
	if c == 0:
		a -= 1
	if c > 0 and r % c > 0:
		a += 1
	if a >= k:
		print('REBEL')
	else:
		print('OBEY')


import sys
from sys import stdin, stdout
import bisect
import math
import heapq

def modinv(n, p):
	return pow(n, p - 2, p)

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())
import math

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def main():
	n = inin()
	for i in range(n):
		(x, y, k) = cin()
		if x > y:
			(x, y) = (y, x)
		q = math.gcd(x, y)
		z = (y - q) / x
		if z <= k - 1:
			print('OBEY')
		else:
			print('REBEL')
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import sys

class ostream:

	def __lshift__(self, a):
		sys.stdout.write(str(a))
		return self
cout = ostream()
endl = '\n'

def readnumbers(zero=0):
	conv = ord if py2 else lambda x: x
	A = []
	numb = zero
	sign = 1
	i = 0
	s = sys.stdin.buffer.read()
	try:
		while True:
			if s[i] >= b'0'[0]:
				numb = 10 * numb + conv(s[i]) - 48
			elif s[i] == b'-'[0]:
				sign = -1
			elif s[i] != b'\r'[0]:
				A.append(sign * numb)
				numb = zero
				sign = 1
			i += 1
	except:
		pass
	if s and s[-1] >= b'0'[0]:
		A.append(sign * numb)
	return A
main()


from collections import deque, Counter
import array
from itertools import combinations, permutations
from math import sqrt, gcd
import unittest

def read_int():
	return int(input().strip())

def read_int_array():
	return [int(i) for i in input().strip().split(' ')]
for test in range(read_int()):
	(r, b, k) = read_int_array()
	(r, b) = (r, b) if r < b else (b, r)
	d = gcd(b, r)
	if d != 1:
		r //= d
		b //= d
	print('OBEY' if r == b or (b - 2) // r + 1 < k else 'REBEL')


import math
T = int(input())
for i in range(T):
	(c, d, k) = map(int, input().split())
	r = min(c, d)
	b = max(c, d)
	if b == r:
		print('OBEY')
	elif b % r == 0:
		key = b / r - 1
		if k <= key:
			print('REBEL')
		else:
			print('OBEY')
	else:
		commonmin = math.gcd(r, b)
		r = r / commonmin
		b = b / commonmin
		if (b - 1) % r == 0:
			key = (b - 1) // r
			if k <= key:
				print('REBEL')
			else:
				print('OBEY')
		else:
			key = (b - 1) // r + 1
			if k <= key:
				print('REBEL')
			else:
				print('OBEY')


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
T = int(input())
for i in range(T):
	(r, b, k) = map(int, input().split())
	g = gcd(r, b)
	r /= g
	b /= g
	x = min(r, b)
	y = max(r, b)
	if (k - 1) * x + 1 >= y:
		print('OBEY')
	else:
		print('REBEL')


from math import gcd
for i in range(int(input())):
	(r, b, k) = map(int, input().split())
	x = max(r, b)
	y = min(r, b)
	d = gcd(x, y)
	x //= d
	y //= d
	if (k - 1) * y + 1 <= x - 1:
		print('REBEL')
	else:
		print('OBEY')


import sys
input = iter(sys.stdin.read().splitlines()).__next__

def gcd(a, b):
	return a if b == 0 else gcd(b, a % b)

def solveAH(r, b, k):
	if r == b:
		return True
	g = gcd(r, b)
	r //= g
	b //= g
	if r > b:
		(r, b) = (b, r)
	return (b - 1 + r - 1) // r < k

def solveBF(r, b, k):
	if r == b:
		return True
	if r > b:
		(r, b) = (b, r)
	runR = 0
	runB = 0
	for n in range(10000):
		if n % r == 0 and n % b == 0:
			runR = 0
			runB += 1
		elif n % r == 0:
			runR += 1
			runB = 0
		elif n % b == 0:
			runB += 1
			runR = 0
		if runR >= k or runB >= k:
			return False
	return True
TC = int(input())
for tc in range(TC):
	(r, b, k) = map(int, input().split())
	if r > b:
		(r, b) = (b, r)
	res = solveAH(r, b, k)
	print('OBEY' if res else 'REBEL')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
testcases = int(input())
for j in range(testcases):
	(r, b, k) = map(int, input().split())
	fac = gcd(r, b)
	maxy = max(r, b) // fac
	minny = min(r, b) // fac
	if k * minny < maxy:
		print('REBEL')
	elif 1 + (k - 1) * minny < maxy:
		print('REBEL')
	else:
		print('OBEY')


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve():
	(r, b, k) = sep()
	(r, b) = (min(r, b), max(r, b))
	l = lcm(r, b)
	temp1 = l // r - 1
	temp2 = l // b
	if ceil(temp1 / temp2) < k:
		print('OBEY')
	else:
		print('REBEL')
testcase(int(inp()))


from collections import defaultdict, deque
import sys, heapq, bisect, math, itertools, string, queue, copy, time
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
mod = 10 ** 9 + 7
eps = 10 ** (-7)

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))

def inpl_str():
	return list(sys.stdin.readline().split())

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
T = inp()
for _ in range(T):
	(a, b, k) = inpl()
	(a, b) = (min(a, b), max(a, b))
	n = gcd(a, b)
	cnt = -((n - b) // a)
	if cnt >= k:
		print('REBEL')
	else:
		print('OBEY')


from math import gcd
for _ in range(int(input())):
	(a, b, k) = map(int, input().split())
	if b < a:
		(a, b) = (b, a)
	if b > a * k:
		print('REBEL')
	elif b > a * (k - 1) + gcd(a, b):
		print('REBEL')
	else:
		print('OBEY')


import math
t = int(input())
for c in range(t):
	(a, b, k) = map(int, input().split())
	if a == b:
		print('OBEY')
		continue
	if a < b:
		(a, b) = (b, a)
	x = math.gcd(a, b)
	step = 1 + int((a - x - 1) / b)
	if step < k:
		print('OBEY')
	else:
		print('REBEL')


from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations
import sys
import bisect
import string
import math
import time

def I():
	return int(input())

def MI():
	return map(int, input().split())

def LI():
	return [int(i) for i in input().split()]

def LI_():
	return [int(i) - 1 for i in input().split()]

def StoI():
	return [ord(i) - 97 for i in input()]

def ItoS(nn):
	return chr(nn + 97)

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
YN = ['Yes', 'No']
mo = 10 ** 9 + 7
inf = float('inf')
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10 ** 5)
input = lambda : sys.stdin.readline().rstrip()
show_flg = False
show_flg = True
OR = ['OBEY', 'REBEL']

def gcd(x, y):
	(y, x) = (max(x, y), min(x, y))
	if y % x == 0:
		return x
	return gcd(x, y % x)
t = I()
for _ in range(t):
	ans = 0
	(r, b, k) = LI()
	(r, b) = (max(r, b), min(r, b))
	g = gcd(r, b)
	(r, b) = (r // g, b // g)
	if (r - 2) // b >= k - 1:
		if r == b and k == 1:
			a = 0
		else:
			a = 1
	else:
		a = 0
	print(OR[a])


from math import gcd
t = int(input())
for _ in range(t):
	(r, b, k) = map(int, input().split())
	l = r * b // gcd(r, b)
	if r == b:
		print('OBEY')
	elif l == max(r, b):
		if k <= max(r, b) // min(r, b) - 1:
			print('REBEL')
		else:
			print('OBEY')
	else:
		rep = max(r, b) // min(r, b)
		if l // max(r, b) * (max(r, b) % min(r, b)) > min(r, b):
			rep += 1
		if k <= rep:
			print('REBEL')
		else:
			print('OBEY')


ans = []
n = int(input())
import math

def nok(a, b):
	(x, y) = (max(a, b), min(a, b))
	while y > 0:
		(x, y) = (y, x % y)
	return int(a * b / x)
for _ in range(n):
	(r, b, k) = map(int, input().split())
	(r, b) = (max(r, b), min(r, b))
	n = nok(r, b)
	if n // b - 1 > n // r * (k - 1):
		ans.append('REBEL')
	else:
		ans.append('OBEY')
for x in ans:
	print(x)


import collections

def gcd(a, b):
	while a > 0 and b > 0:
		if a > b:
			a %= b
		else:
			b %= a
	return a + b
for T in range(int(input())):
	(r, b, k) = map(int, input().split())
	g = gcd(r, b)
	r //= g
	b //= g
	(mx, mn) = (max(r, b), min(r, b))
	if mn == mx == 1:
		print('OBEY')
	elif mn == 1:
		if mx - 1 >= k:
			print('REBEL')
		else:
			print('OBEY')
	else:
		cnt = mx // mn
		if mx % mn == 1:
			if cnt >= k:
				print('REBEL')
			else:
				print('OBEY')
		elif cnt + 1 >= k:
			print('REBEL')
		else:
			print('OBEY')


import sys
import math
input = sys.stdin.readline
for _ in range(int(input())):
	(r, b, k) = map(int, input().split())
	if r > b:
		(r, b) = (b, r)
	x = math.gcd(r, b)
	if x > 1:
		r = r // x
		b = b // x
	if (k - 1) * r + 1 >= b:
		print('OBEY')
	else:
		print('REBEL')


def computeGCD(x, y):
	if y == 0:
		return x
	else:
		return computeGCD(y, x % y)
n = int(input())
import math

def getAns(arr):
	r = arr[0]
	b = arr[1]
	k = arr[2]
	if k <= 1:
		print('REBEL')
		return
	if r > b:
		bigger = r
		smaller = b
	else:
		bigger = b
		smaller = r
	theGCD = computeGCD(bigger, smaller)
	bigger //= theGCD
	smaller //= theGCD
	cap = math.ceil((bigger - 1) / smaller)
	if cap < k:
		print('OBEY')
	else:
		print('REBEL')
for i in range(n):
	getAns([int(x) for x in input().split(' ')])


import math
cases = int(input())
val = 1
for i in range(100):
	val *= 10
for i in range(cases):
	(x, y, k) = map(int, input().split())
	z = x * y // math.gcd(x, y)
	a = val // x
	b = val // y
	c = val // z
	a -= c
	b -= c
	if a > b:
		(a, b) = (b, a)
	r = min(c, b - a)
	c -= r
	a += r
	a += c // 2
	b += c - c // 2
	if a > b:
		(a, b) = (b, a)
	res = a // (k - 1)
	res2 = b // (k - 1)
	if b % (k - 1) != 0:
		res2 += 1
	if a + 1 < res2:
		print('REBEL')
	else:
		print('OBEY')


def gcd(a, b):
	if a < b:
		(a, b) = (b, a)
	while a % b != 0:
		(a, b) = (b, a % b)
	return b
w = int(input())
for i in range(0, w):
	(r, b, k) = map(int, input().split())
	s = gcd(r, b)
	if s == b:
		if r / b <= k:
			print('OBEY')
		else:
			print('REBEL')
	elif s == r:
		if b / r <= k:
			print('OBEY')
		else:
			print('REBEL')
	else:
		y = int((max(r, b) - 1) / min(r, b))
		if y + 1 <= k and y == (max(r, b) - gcd(r, b)) / min(r, b):
			print('OBEY')
		elif y + 1 < k and y != (max(r, b) - gcd(r, b)) / min(r, b):
			print('OBEY')
		else:
			print('REBEL')


import os
import sys
from io import BytesIO, IOBase
import math
from queue import Queue
import collections
import itertools
import bisect
import heapq
import random

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(int(n))
	return l

def primeFactorsCount(n):
	cnt = 0
	while n % 2 == 0:
		cnt += 1
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			cnt += 1
			n = n // i
	if n > 2:
		cnt += 1
	return cnt

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def maxPrimeFactors(n):
	maxPrime = -1
	while n % 2 == 0:
		maxPrime = 2
		n >>= 1
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			maxPrime = i
			n = n / i
	if n > 2:
		maxPrime = n
	return int(maxPrime)

def countcon(s, i):
	c = 0
	ch = s[i]
	for i in range(i, len(s)):
		if s[i] == ch:
			c += 1
		else:
			break
	return c

def lis(arr):
	n = len(arr)
	lis = [1] * n
	for i in range(1, n):
		for j in range(0, i):
			if arr[i] > arr[j] and lis[i] < lis[j] + 1:
				lis[i] = lis[j] + 1
	maximum = 0
	for i in range(n):
		maximum = max(maximum, lis[i])
	return maximum

def isSubSequence(str1, str2):
	m = len(str1)
	n = len(str2)
	j = 0
	i = 0
	while j < m and i < n:
		if str1[j] == str2[i]:
			j = j + 1
		i = i + 1
	return j == m

def maxfac(n):
	root = int(n ** 0.5)
	for i in range(2, root + 1):
		if n % i == 0:
			return n // i
	return n

def p2(n):
	c = 0
	while n % 2 == 0:
		n //= 2
		c += 1
	return c

def seive(n):
	primes = [True] * (n + 1)
	primes[1] = primes[0] = False
	i = 2
	while i * i <= n:
		if primes[i] == True:
			for j in range(i * i, n + 1, i):
				primes[j] = False
		i += 1
	pr = []
	for i in range(0, n + 1):
		if primes[i]:
			pr.append(i)
	return pr

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def denofactinverse(n, m):
	fac = 1
	for i in range(1, n + 1):
		fac = fac * i % m
	return pow(fac, m - 2, m)

def numofact(n, m):
	fac = 1
	for i in range(1, n + 1):
		fac = fac * i % m
	return fac

def sod(n):
	s = 0
	while n > 0:
		s += n % 10
		n //= 10
	return s

def getXor(n):
	xor = 1
	for i in range(2, n + 1):
		xor = xor ^ i
	return xor
for xyz in range(0, int(input())):
	(r, b, k) = map(int, input().split())
	(r, b) = (min(r, b), max(r, b))
	t = math.gcd(r, b)
	if (k - 1) * r >= b - t:
		print('OBEY')
	else:
		print('REBEL')


import math
t = int(input())
while t:
	(a, b, k) = map(int, input().split())
	a1 = min(a, b)
	b1 = max(a, b)
	m = math.gcd(a, b)
	if a1 == b1:
		print('OBEY')
	else:
		adj = math.ceil((b1 - m) / a1)
		if adj >= k:
			print('REBEL')
		else:
			print('OBEY')
	t -= 1


from math import gcd

def run_testcase():
	[r, b, k] = [int(x) for x in input().split()]
	if r == b:
		return 'OBEY'
	gcd_rb = gcd(r, b)
	r //= gcd_rb
	b //= gcd_rb
	val_max = max(r, b)
	val_min = min(r, b)
	longest_sequence = val_max // val_min
	if val_max % val_min > 1:
		longest_sequence += 1
	elif val_max % val_min == 0:
		longest_sequence -= 1
	if longest_sequence < k:
		return 'OBEY'
	else:
		return 'REBEL'
testcase_count = int(input())
for i in range(testcase_count):
	print(str(run_testcase()))


def gcd(a, b):
	while a % b != 0:
		r_ = a % b
		a = b
		b = r_
	return b
for _ in range(int(input())):
	(r, b, k) = map(int, input().split())
	if r > b:
		(r, b) = (b, r)
	max_same = b // r
	g = gcd(r, b)
	r = r // g
	b = b // g
	if b % r == 0:
		max_same -= 1
	if b % r > 1:
		max_same += 1
	print('OBEY' if max_same < k else 'REBEL')