#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long a, b, c, aa = -1, bb = -1;
    cin >> a >> b >> c;
    if (a < c)
      aa = 1;
    else if (c < a)
      bb = 1;
    long long p = 1000000000 * a, q = ceil(1000000000 / (float)b) * c;
    if (q < p)
      bb = 1000000000;
    else if (p < q)
      aa = 1000000000;
    if (a * b < c)
      aa = b;
    else if (c < a * b)
      bb = b;
    cout << aa << " " << bb << '\n';
  }
}
