#include <bits/stdc++.h>
using namespace std;
int t;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> t;
  while (t--) {
    long long a, b, c;
    cin >> a >> b >> c;
    if (c <= a) {
      cout << -1 << ' ' << b << endl;
    } else {
      if (c > a * b) {
        cout << 1 << ' ' << -1 << endl;
      } else if (c == a * b) {
        cout << b - 1 << ' ' << -1 << endl;
      } else {
        cout << 1 << ' ' << b << endl;
      }
    }
  }
  return 0;
}
