#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int t;
  long long a, b, c;
  cin >> t;
  while (t--) {
    cin >> a >> b >> c;
    if (a < c)
      cout << "1 ";
    else
      cout << "-1 ";
    if (a * b <= c)
      cout << "-1\n";
    else
      cout << b << '\n';
  }
  return 0;
}
