#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
void solve() {
  long long int a, b, c;
  cin >> a >> b >> c;
  long long int c1 = b * a;
  long long int c2 = c;
  if (a < c) {
    cout << 1 << " ";
    if (c2 < c1) {
      cout << b << "\n";
    } else {
      cout << -1 << "\n";
    }
  } else {
    cout << -1 << " ";
    if (c1 <= c2)
      cout << -1 << "\n";
    else
      cout << b << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int T = 1;
  cin >> T;
  while (T--) {
    solve();
  }
  return 0;
}
