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