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