#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, a, b, c, d;
  cin >> t;
  while (t--) {
    cin >> a >> b >> c;
    if (a >= c)
      cout << -1 << " ";
    else
      cout << 1 << " ";
    d = c / b;
    if (a > d)
      cout << b << " ";
    else
      cout << -1 << " ";
    cout << endl;
  }
}
