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