#include <bits/stdc++.h>
const long long MOD = 1e9 + 7;
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a, b, c;
    cin >> a >> b >> c;
    if (a > b) {
      swap(a, b);
    }
    int g = gcd(a, b);
    a /= g;
    b /= g;
    int maxi = (a + b - 2) / a;
    if (c > maxi) {
      cout << "OBEY"
           << "\n";
    } else {
      cout << "REBEL"
           << "\n";
    }
  }
  return 0;
}
