#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int T;
  cin >> T;
  long long a, b, c;
  while (T-- > 0) {
    cin >> a >> b >> c;
    if (b == 1) {
      if (c > a) {
        cout << 1 << " " << -1 << '\n';
      } else if (c == a) {
        cout << -1 << " " << -1 << '\n';
      } else {
        cout << -1 << " " << 1 << '\n';
      }
    } else {
      long long temp = b * a;
      if (a >= c) {
        cout << -1 << " " << b << '\n';
      } else {
        cout << 1 << " ";
        if (temp <= c) {
          cout << -1 << '\n';
        } else {
          cout << b << '\n';
        }
      }
    }
  }
  return 0;
}
