#include <bits/stdc++.h>
using namespace std;
void boost() {
  cin.sync_with_stdio(0);
  cout.sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  boost();
  int t;
  cin >> t;
  long long a, b, c;
  while (t--) {
    cin >> a >> b >> c;
    if (a < c)
      cout << "1 ";
    else
      cout << "-1 ";
    if (c < a * b)
      cout << b << "\n";
    else
      cout << "-1\n";
  }
}
