#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void testcase() {
  ll a, b, c;
  cin >> a >> b >> c;
  if (a >= c) {
    cout << "-1 ";
    if (a > c) {
      cout << "1\n";
    } else {
      cout << b << "\n";
    }
  } else {
    cout << 1 << " ";
    if (b * a > c) {
      cout << b << "\n";
    } else {
      cout << "-1\n";
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  if (1) cin >> t;
  while (t--) {
    testcase();
  }
  return 0;
}
