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