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