#include <bits/stdc++.h>
using namespace std;
const int maxm = 2e3 + 23;
const int maxn = 2e5 + 35;
int main() {
  int T, a, b, c;
  cin >> T;
  while (T--) {
    cin >> a >> b >> c;
    if (a < c)
      printf("1 ");
    else
      printf("-1 ");
    if (1ll * a * b > c)
      printf("%d\n", b);
    else
      puts("-1");
  }
  return 0;
}
