#include <bits/stdc++.h>
using namespace std;
long long int const inf = 1e18;
long long int const maxn = 1e6 + 5;
long long int const mod = 1e9 + 7;
int 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;
    long long int ans1, ans2;
    ans1 = (c <= a ? -1 : 1);
    ans2 = (b * a <= c ? -1 : b);
    cout << ans1 << " " << ans2 << "\n";
    ;
  }
  return 0;
}
