#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long a, b, c, i;
    cin >> a >> b >> c;
    double x = a * 1.0;
    double y = (c * (1.0) / b);
    double ax = 0, ay = c;
    if (c <= a) {
      cout << "-1 " << b << "\n";
      continue;
    } else if (b * a <= c) {
      cout << "1 -1\n";
      continue;
    }
    cout << "1 " << b << "\n";
  }
  return 0;
}
