#include <bits/stdc++.h>
int main() {
  long long int t, a, b, c;
  scanf("%lld", &t);
  while (t--) {
    scanf("%lld %lld %lld", &a, &b, &c);
    if (a > c)
      printf("%d %d\n", -1, 1);
    else if (a == c)
      printf("%d %d\n", -1, 2);
    else if ((c / a) >= b)
      printf("%d %d\n", 1, -1);
    else
      printf("%d %lld\n", 1, b);
  }
  return 0;
}
