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