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