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