#include <bits/stdc++.h>
using namespace std;
int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    long long a, b, c;
    cin >> a >> b >> c;
    cout << ((a < c) ? 1 : -1) << ' ';
    cout << ((a * b > c) ? b : -1) << endl;
  }
}
