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