#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long a, b, c;
  cin >> a >> b >> c;
  if (a < c)
    cout << "1 ";
  else
    cout << "-1 ";
  if (a * b > c)
    cout << b << '\n';
  else
    cout << "-1\n";
}
signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  long long t = 1;
  cin >> t;
  while (t--) solve();
  return 0;
}
