#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int a, b, k;
    cin >> a >> b >> k;
    if (a > b) {
      long long int tem = a;
      a = b;
      b = tem;
    }
    long long int g = gcd(a, b);
    a /= g;
    b /= g;
    if (a == b) {
      cout << "OBEY\n";
      continue;
    }
    int u = (b - 1) / a;
    if ((b - 1) % a != 0) u++;
    if (u < k) {
      cout << "OBEY\n";
      continue;
    }
    cout << "REBEL\n";
  }
}
