#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll a, b, c;
int solve() {
  if (!(cin >> a >> b >> c)) return 1;
  ll ans1 = -1, ans2 = -1;
  if (c < a * b) ans2 = b;
  if (a < c) ans1 = 1;
  cout << ans1 << ' ' << ans2 << '\n';
  return 0;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tests = 1e9;
  cin >> tests;
  for (int i = 1; i <= tests; i++) {
    if (solve()) break;
  }
}
