#include <bits/stdc++.h>
using namespace std;
long long p1, p2, k;
bool ans;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
inline long long dread() {
  long long x = 0;
  bool f = 1;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar()) f ^= (ch == '-');
  for (; ch >= '0' && ch <= '9'; ch = getchar())
    x = (x << 1) + (x << 3) + (ch ^ 48);
  return f ? x : -x;
}
int main() {
  for (long long T = dread(), _39; T; T--) {
    p1 = dread(), p2 = dread(), k = dread();
    if (p1 > p2) swap(p1, p2);
    if (p2 % p1)
      _39 = lcm(p1, p2), ans = ((_39 / p1 + _39 / p2 - 2) / (_39 / p2) < k);
    else
      ans = ((p2 / p1) <= k);
    puts(ans ? "OBEY" : "REBEL");
  }
  return 0;
}
