#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  for (const auto& x : v) os << x << " ";
  return os << "\n";
}
template <typename T>
void operator>>(istream& is, vector<T>& v) {
  for (auto& x : v) is >> x;
}
ll power(ll a, ll n) {
  if (n == 0) {
    return 1;
  }
  ll sqrt_a = pow(a, n / 2);
  if (n % 2 == 1) {
    return sqrt_a * sqrt_a * a;
  } else {
    return sqrt_a * sqrt_a;
  }
}
template <typename T>
T sign(T a) {
  if (a < 0) return -1;
  if (a > 0) return 1;
  return 0;
}
template <typename T>
T log_2(T n) {
  T i = 1;
  T j = 0;
  while (i < n) {
    i *= 2;
    ++j;
  }
  return j;
}
template <typename T>
T mod(T a, T b) {
  T ans = a % b;
  return ans < 0 ? ans + b : ans;
}
ll gcd(ll a, ll b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
class Node {
 public:
  char symbol;
  bool passed = false;
  vector<ll> neighbores = vector<ll>();
};
template <typename T>
class Compare {
 public:
  bool operator()(T& a, T& b) {
    if (a.first < b.first) {
      return true;
    } else if (a.first == b.first) {
      return a.second < b.second;
    } else {
      return false;
    }
  }
};
vector<ll> divs(ll n) {
  vector<ll> ans;
  while (n != 1) {
    for (ll i = 2; i <= n; ++i) {
      if (n % i == 0) {
        ans.push_back(i);
        n /= i;
        break;
      }
    }
  }
  return ans;
}
void solve() {
  ll a, b, c;
  cin >> a >> b >> c;
  if (a < c) {
    cout << "1 ";
  } else {
    cout << "-1 ";
  }
  if (b * a > c) {
    cout << b << "\n";
  } else {
    cout << "-1\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll t;
  cin >> t;
  while (t--) {
    solve();
  }
}
