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