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