#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) {
      cout << "-1 " << b << "\n";
    } else if (a > c) {
      cout << "-1 1\n";
    } else {
      double x = (double)c / b;
      double y = (double)a;
      if (x < y)
        cout << "1 " << b << "\n";
      else
        cout << "1 -1\n";
    }
  }
  return 0;
}
