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