#include <bits/stdc++.h>
using namespace std;
const long long mod = 10001;
const long long N = 1e5 + 10;
const double eps = 1e-4;
long long gcd(int a, int b) { return !b ? a : gcd(b, a % b); }
int dx[4] = {-1, 0, 1, 0}, dy[4] = {0, 1, 0, -1};
void solve() {
  long long a, b, c;
  cin >> a >> b >> c;
  long long sum1, sum2;
  if (a >= c)
    sum1 = -1;
  else
    sum1 = 1;
  if (a * b <= c)
    sum2 = -1;
  else
    sum2 = b;
  cout << sum1 << " " << sum2 << endl;
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  std::cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    solve();
  }
  return 0;
}
