#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
int main() {
  ios_base::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    ll a, b, c;
    cin >> a >> b >> c;
    ll x, y;
    if (a == c and b == 1) {
      cout << "-1 -1" << '\n';
      continue;
    }
    if (c <= a)
      x = -1;
    else
      x = 1;
    if (a * b <= c)
      y = -1;
    else
      y = b;
    cout << x << ' ' << y << '\n';
  }
  return 0;
}
