#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t t;
  cin >> t;
  while (t--) {
    int64_t a, b, c;
    cin >> a >> b >> c;
    cout << (a < c ? 1 : -1) << ' ' << (a * b > c ? b : -1) << '\n';
  }
  return 0;
}
