#include <bits/stdc++.h>
using namespace std;
const long long MOD2 = 998244353;
const long long MOD = 1e9 + 7;
const long long MAX = 1e5 + 7;
const long long inf = 1e18L + 5;
const double pi = 3.14159265358979323846;
long long fpow(long long n, long long m) {
  long long res = 1;
  while (m > 0) {
    if (m & 1) {
      res *= n;
    }
    m /= 2;
    n *= n;
  }
  return res;
}
long long modInv(long long n) { return fpow(n, MOD - 2); }
const long long nax = 1e5 + 5;
void solve() {
  long long a, b, c;
  cin >> a >> b >> c;
  long long a1 = -1, b1 = -1;
  if (a < c) {
    a1 = 1;
  }
  if (a * b > c) {
    b1 = b;
  }
  cout << a1 << " " << b1 << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
