#include <bits/stdc++.h>
using namespace std;
int odddivisor(int n) {
  int max = 0;
  for (int i = 1; i <= n / 2; i++) {
    if (n % i == 0) {
      if (i % 2 == 1) {
        max = i;
      }
    }
  }
  return max;
}
void solution() {
  long long int a, b, c;
  cin >> a >> b >> c;
  if (a < c) {
    cout << "1"
         << " ";
  } else {
    cout << "-1"
         << " ";
  }
  if (c < (a * b)) {
    cout << b << endl;
  } else {
    cout << "-1" << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    solution();
  }
  return 0;
}
