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