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