#include <bits/stdc++.h>
using namespace std;
int T;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
int gcd(int a, int b) { return !b ? a : gcd(b, a % b); }
int main() {
  for (T = read(); T; T--) {
    int a = read(), b = read(), k = read();
    if (a > b) swap(a, b);
    if ((b - gcd(a, b) - 1) / a + 1 < k)
      printf("OBEY\n");
    else
      printf("REBEL\n");
  }
  return 0;
}
