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