#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long a, b, c;
    cin >> a >> b >> c;
    float d, f, e;
    d = a;
    e = b;
    f = c;
    if (c / b <= a && a >= c)
      cout << "-1 " << b << "\n";
    else if (a <= c / b)
      cout << "1 -1\n";
    else {
      cout << "1 " << b << "\n";
    }
  }
  return 0;
}
