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