#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
long long n, a, b, k;
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
int main() {
  scanf("%lld", &n);
  for (long long cnt = 1; cnt <= n; cnt++) {
    scanf("%lld %lld %lld", &a, &b, &k);
    long long eee = gcd(a, b);
    long long woc = a / gcd(a, b) * b;
    a = woc / a - 1;
    b = woc / b - 1;
    long long minn = min(a, b);
    long long maxx = max(a, b);
    if (minn == 0) {
      if (maxx == 0) {
        printf("OBEY\n");
      } else {
        if (k > maxx)
          printf("OBEY\n");
        else
          printf("REBEL\n");
      }
    } else {
      minn++;
      if (maxx % minn == 0) {
        if (k > maxx / minn)
          printf("OBEY\n");
        else
          printf("REBEL\n");
      } else {
        if (k > maxx / minn + 1)
          printf("OBEY\n");
        else
          printf("REBEL\n");
      }
    }
  }
  return 0;
}
