#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  long long a, b, c, count1, count2, diff, i, pdiff;
  cin >> t;
  while (t--) {
    count1 = count2 = -1;
    cin >> a >> b >> c;
    i = 1;
    if (a < c) count1 = 1;
    pdiff = LLONG_MAX;
    if (c < a * b) count2 = b;
    while (((a * b) * i < c * i) && diff < pdiff) {
      i++;
    }
    cout << count1 << " " << count2 << endl;
  }
  return 0;
}
