#include <bits/stdc++.h>
using namespace std;
int main() {
  long long tc;
  cin >> tc;
  while (tc--) {
    long long A, B, C;
    cin >> A >> B >> C;
    if (A < C) {
      cout << 1 << " ";
    } else {
      cout << "-1 ";
    }
    if (C < A * B) {
      cout << B;
    } else
      cout << -1;
    cout << endl;
  }
}
