#include <bits/stdc++.h>
using namespace std;
const int N = 500, mod = 1000000007;
long long t, r, b, k;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  for (scanf("%lld", &t); t--;) {
    scanf("%lld%lld%lld", &r, &b, &k);
    int gcdd = gcd(r, b);
    r /= gcdd;
    b /= gcdd;
    if (r > b) swap(r, b);
    if (r * (k - 1) + 1 >= b)
      puts("OBEY");
    else
      puts("REBEL");
  }
  return 0;
}
