#include <bits/stdc++.h>
using namespace std;
int gcd(int n, int m) {
  if (m == 0) return n;
  return gcd(m, n % m);
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    int r, b, k;
    scanf("%d%d%d", &r, &b, &k);
    if (r < b) swap(r, b);
    int g = gcd(r, b);
    r /= g;
    b /= g;
    if ((long long)(k)*b <= b + r - 2)
      puts("REBEL");
    else
      puts("OBEY");
  }
  return 0;
}
