#include <bits/stdc++.h>
template <typename X>
std::ostream& operator<<(std::ostream& out, std::vector<X> v) {
  for (auto& i : v) out << i << " ";
  return out;
}
template <typename X, typename Y>
std::ostream& operator<<(std::ostream& out, std::pair<X, Y> p) {
  out << p.first << " " << p.second;
  return out;
}
static const long long mod = 1000000007;
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  std::cin.tie(0);
  std::cout.tie(0);
  long long T;
  std::cin >> T;
  while (T--) {
    long long a, b, c;
    cin >> a >> b >> c;
    long long xa = -1, xb = -1;
    if (a < c) xa = 1;
    if (a * b > c) xb = b;
    cout << xa << " " << xb << "\n";
  }
  return 0;
}
