#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int T;
  cin >> T;
  for (int i = 0; i < T; i++) {
    ll small, large, k;
    cin >> small >> large >> k;
    if (small == large) {
      cout << "OBEY" << endl;
      continue;
    }
    if (large < small) {
      swap(small, large);
    }
    ll s{small}, l{large}, r, lcm;
    r = l % s;
    while (r != 0) {
      l = s;
      s = r;
      r = l % s;
    }
    lcm = small * large / s;
    ll s2{lcm / small - 1}, l2{lcm / large}, ans;
    if (s2 % l2 == 0) {
      ans = s2 / l2;
    } else {
      ans = s2 / l2 + 1;
    }
    if (ans < k) {
      cout << "OBEY" << endl;
    } else {
      cout << "REBEL" << endl;
    }
  }
  return 0;
}
