#include <bits/stdc++.h>
using namespace std;
const double Epsilon = 4.94065645841247E-324;
const long long int mod = 1000000007;
const long double pi = 3.14159265358979323846;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long i, j, k, t, n, m, ans, x, y, z, a, b, c;
  cin >> t;
  while (t--) {
    cin >> a >> b >> c;
    if (c <= a) {
      cout << "-1 ";
    } else
      cout << "1 ";
    if (b * a <= c)
      cout << "-1" << endl;
    else
      cout << b << endl;
  }
  return 0;
}
