#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
long long x, y, z, a, b, c, sum, ans, total, t, cnt, n, m, k, p, kase;
string s1, s2;
map<long long, long long> mp;
set<long long> s;
map<long long, long long>::iterator itr1, ptr1;
set<long long>::iterator itr, ptr;
int main() {
  a += 100;
  cin >> t;
  while (t--) {
    cin >> a >> b >> c;
    if (a < c) {
      cout << 1 << " ";
      if ((b * a) > c)
        cout << b << endl;
      else
        cout << "-1" << endl;
    } else if (a == c) {
      if (b != 1) {
        cout << "-1"
             << " " << b << endl;
      } else
        cout << "-1"
             << " "
             << "-1" << endl;
    } else {
      cout << "-1"
           << " " << b << endl;
    }
  }
  return 0;
}
