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