#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t, n, k, x, a, b, c;
  string s, ans;
  cin >> t;
  while (t--) {
    cin >> a >> b >> c;
    if (c / a == b && c % a == 0) {
      cout << b - 1 << " -1" << endl;
    } else if (a >= c) {
      cout << "-1 " << b << endl;
    } else if (c / a >= b) {
      cout << "1 -1" << endl;
    } else {
      cout << "1 " << b << endl;
    }
  }
}
