#include <bits/stdc++.h>
using namespace std;
const long long inf = 1000000007;
long long binpow(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res = res * a % inf;
    a = a * a % inf;
    n >>= 1;
  }
  return res % inf;
}
void solve() {
  long long a, b, c, ans1 = -1, ans2 = -1;
  cin >> a >> b >> c;
  if (a < c) {
    ans1 = 1;
  } else {
    ans1 = -1;
  }
  if (a * b > c) {
    ans2 = b;
  } else {
    ans2 = -1;
  }
  cout << ans1 << ' ' << ans2 << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
