#include <bits/stdc++.h>
using namespace std;
void solve() {
  double a, b, c;
  cin >> a >> b >> c;
  double percost = c / b;
  if (percost >= a) {
    if (b > 1) {
      cout << "1"
           << " "
           << "-1"
           << "\n";
    } else {
      cout << "-1"
           << " "
           << "-1"
           << "\n";
    }
  } else {
    if (c > a) {
      cout << "1"
           << " " << int(b) << "\n";
    } else {
      cout << "-1"
           << " " << int(b) << "\n";
    }
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
