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