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