#include <bits/stdc++.h>
using namespace std;
long long cmmdc(long long a, long long b) {
  long long r;
  while (b > 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
void solver() {
  long long r, b, k;
  cin >> r >> b >> k;
  if (r > b) swap(r, b);
  if (r == b)
    cout << "OBEY\n";
  else {
    long long c = cmmdc(b, r);
    r /= c;
    b /= c;
    if (1 + r * (k - 1) <= b - 1)
      cout << "REBEL\n";
    else
      cout << "OBEY\n";
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) solver();
  return 0;
}
