#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int tn;
  cin >> tn;
  auto gcd = [&](int a, int b) {
    while (b > 0) {
      int r = a % b;
      a = b;
      b = r;
    }
    return a;
  };
  while (tn--) {
    int a, b, k;
    cin >> a >> b >> k;
    int g = gcd(a, b);
    a /= g;
    b /= g;
    if (a > b) {
      swap(a, b);
    }
    if ((b - 1 + a - 1) / a < k) {
      cout << "OBEY\n";
    } else {
      cout << "REBEL\n";
    }
  }
  return 0;
}
