#include <bits/stdc++.h>
using namespace std;
vector<long long int> primefactors;
vector<long long int> fact;
void getPrimeFactors(long long int n) {
  primefactors.clear();
  for (long long int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      primefactors.push_back(i);
      while (n % i == 0) n = n / i;
    }
  }
  if (n != 1) primefactors.push_back(n);
}
int binomialCoeff(int n, int k) {
  int C[n + 1][k + 1];
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j <= k && j <= i; j++) {
      if (j == 0 || j == i)
        C[i][j] = 1;
      else
        C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]);
    }
  }
  return C[n][k];
}
long long int pwr(long long int base, long long int exp) {
  if (exp == 0) return 1;
  long long int x;
  if (exp % 2 == 0) {
    x = pwr(base, (exp) / 2);
    return (x * x) % (long long int)1000000007;
  } else {
    return (base * pwr(base, exp - 1)) % (long long int)1000000007;
  }
}
long long int pwrm(long long int a, long long int b, long long int m) {
  a %= m;
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
int gcd(int a, int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
void printstack(stack<int> b) {
  while (!b.empty()) {
    cout << b.top() << " ";
    b.pop();
  }
  cout << '\n';
}
void getFactorial(long long int n) {
  fact.push_back(1);
  for (long long int i = 1; i <= n; i++)
    fact.push_back((i * 1ll * fact[i - 1]) % (long long int)1000000007);
}
bool isPrime(long long int n) {
  if (n < 2) return false;
  for (long long int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
int fib(int n) {
  double phi = (1 + sqrt(5)) / 2;
  return round(pow(phi, n) / sqrt(5));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int a, b, c;
    cin >> a >> b >> c;
    if (a >= c) {
      cout << "-1"
           << " ";
    } else {
      cout << 1 << " ";
    }
    if (a > c) {
      cout << 1 << '\n';
    } else if (a * b > c) {
      cout << b << '\n';
    } else {
      cout << -1 << '\n';
    }
  }
  return 0;
}
