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