#include <bits/stdc++.h>
int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    int r, b, k;
    scanf("%d%d%d", &r, &b, &k);
    if (r > b) r ^= b ^= r ^= b;
    int g = gcd(r, b);
    r /= g, b /= g;
    if (r == b || (b + r - 2) / r < k)
      puts("OBEY");
    else
      puts("REBEL");
  }
}
