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