#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int tt;
  cin >> tt;
  while (tt--) {
    long long int a, b, c;
    cin >> a >> b >> c;
    float x = c / b;
    if (x >= a) {
      cout << 1 << " " << -1 << endl;
      continue;
    }
    if (x < a) {
      if (c > a)
        cout << 1 << " " << b << endl;
      else {
        cout << -1 << " " << b << endl;
      }
    }
  }
}
