#include <bits/stdc++.h>
using namespace std;
void test_case() {
  long long int a, b, c;
  cin >> a >> b >> c;
  if (a < c && c >= 2) {
    cout << 1;
  } else {
    cout << -1;
  }
  if (a * b > c) {
    cout << " " << b << endl;
  } else {
    cout << " -1" << endl;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  cin >> t;
  for (int i = 1; i <= t; i++) {
    test_case();
  }
  return 0;
}
