#include <bits/stdc++.h>
using namespace std;
typedef pair<long long, long long> ll;
typedef vector<long long> vl;
typedef vector<ll> vll;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
void solve() {
  long long x, y, k;
  cin >> x >> y >> k;
  long long temp = max(x, y);
  y = min(x, y);
  x = temp;
  long long g = gcd(x, y);
  long long ans = (x - (g)-1) / y + 1;
  if (ans < k) {
    cout << "OBEY" << endl;
  } else
    cout << "REBEL" << endl;
}
int main() {
  long long n;
  cin >> n;
  while (n--) solve();
  return 0;
}
