#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    long long int a, b, c;
    cin >> a >> b >> c;
    long long int ans1 = 0, ans2 = 0;
    if (a >= c)
      ans1 = -1;
    else
      ans1 = 1;
    if (a * b > c)
      ans2 = b;
    else
      ans2 = -1;
    cout << ans1 << ' ' << ans2 << endl;
  }
  return 0;
}
