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