#include <bits/stdc++.h>
void cpc() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
using namespace std;
int main() {
  long long test;
  cin >> test;
  while (test--) {
    long long a, b, c;
    cin >> a >> b >> c;
    a < c ? printf("1 ") : printf("-1 ");
    c < a *b ? printf("%d\n", b) : printf("-1\n");
  }
  return 0;
}
