#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const int maxn = 200010;
const long long Mod = 1000000007;
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  ;
  int t;
  int n;
  long long a, b, c;
  cin >> t;
  while (t--) {
    cin >> a >> b >> c;
    if (a >= c) {
      cout << -1 << ' ';
    } else {
      cout << 1 << ' ';
    }
    if (a * b <= c) {
      cout << -1 << endl;
    } else
      cout << b << endl;
  }
  return 0;
}
