#include <bits/stdc++.h>
using namespace std;
vector<int> pf1;
void primeFactors(long long n) {
  while (n % 2 == 0) {
    pf1.push_back(2);
    n = n / 2;
  }
  for (int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      pf1.push_back(i);
      n = n / i;
    }
  }
  if (n > 2) pf1.push_back(n);
}
int isSubString(string s1, string s2) {
  int a = s1.length();
  int b = s2.length();
  for (int i = 0; i <= b - a; i++) {
    int j;
    for (j = 0; j < a; j++) {
      if (s2[i + j] != s1[j]) break;
    }
    if (j == a) return i;
  }
  return -1;
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int lcm(int a, int b) { return a * b / gcd(a, b); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int a, b, c;
    cin >> a >> b >> c;
    if (a < c) {
      cout << "1 ";
      if ((c / a) < b)
        cout << b << endl;
      else
        cout << "-1" << endl;
    } else if (a == c) {
      cout << "-1 ";
      cout << b << endl;
    } else {
      cout << "-1 " << b << endl;
    }
  }
  return 0;
}
