#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int t, i, n, m, j, x, y, pos, ans, sum, mini, k, diff;
  string s;
  bool flag;
  cin >> t;
  while (t--) {
    long long int a, b, c;
    cin >> a >> b >> c;
    if (a < c)
      cout << 1 << " ";
    else
      cout << -1 << " ";
    if (c / b >= a)
      cout << -1 << "\n";
    else
      cout << b << "\n";
  }
}
