#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, j;
  cin >> t;
  for (j = 0; j < t; j++) {
    long long a, b, c, p = 0, r = 0;
    cin >> a >> b >> c;
    if (a >= c)
      p = -1;
    else
      p = 1;
    if ((c / b) >= a)
      r = -1;
    else
      r = b;
    cout << p << " " << r << endl;
  }
  return 0;
}
