#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int INF = INT_MAX;
const int mod = 1e9 + 7;
const int N = 2e5 + 10;
inline int add(int x, int y) {
  x += y;
  if (x >= mod) x -= mod;
  return x;
}
inline int mul(int x, int y) {
  x = (1LL * x * y) % mod;
  return x;
}
clock_t time_p = clock();
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long a, b, c;
    cin >> a >> b >> c;
    int ans1 = -1, ans2 = -1;
    if (a * b < c) {
      ans1 = b;
    } else {
      if (a < c) {
        ans1 = 1;
      }
    }
    if (a * b > c) {
      ans2 = b;
    }
    cout << ans1 << " " << ans2 << "\n";
  }
  time_p = clock() - time_p;
  cerr << "\nTime Taken : " << (float)(time_p) / CLOCKS_PER_SEC << "\n";
  return 0;
}
