#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const ll MOD = 1e9 + 7;
const double PI = 3.14159265358;
const double EPS = 1e-8;
ll gcd(ll a, ll b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  ll t, a, b, k, tmp;
  cin >> t;
  while (t--) {
    cin >> a >> b >> k;
    if (a < b) swap(a, b);
    tmp = gcd(a, b);
    a /= tmp;
    b /= tmp;
    if (b * (k - 1) + 1 < a)
      cout << "REBEL" << '\n';
    else
      cout << "OBEY" << '\n';
  }
}
