#include <bits/stdc++.h>
using namespace std;
const long long int INF = 0x3f3f3f3f;
long long int mm[100][100];
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int a, b, c;
    cin >> a >> b >> c;
    if (c <= a) {
      cout << -1 << " " << b << endl;
    } else if (a * b <= c) {
      cout << 1 << " " << -1 << endl;
    } else {
      cout << 1 << " " << b << endl;
    }
  }
}
