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