#include <bits/stdc++.h>
using namespace std;
long long int exp(long long int n, long long int m, long long int md) {
  long long int a = 1;
  while (m > 0) {
    if (m & 1) a = (a * n % md) % md;
    m /= 2;
    n = (n * n) % md;
  }
  return a % md;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int T;
  cin >> T;
  for (int tt = 1; tt <= T; tt++) {
    long long int a, b, c;
    cin >> a >> b >> c;
    long long int ans1 = 0, ans2 = 0;
    if (c < a * b)
      ans2 = b;
    else
      ans2 = -1;
    if (a < c)
      ans1 = 1;
    else
      ans1 = -1;
    cout << ans1 << " " << ans2 << endl;
  }
  return 0;
}
