#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 5;
signed main() {
  long long t, n;
  long long a, b, c;
  cin >> t;
  while (t--) {
    cin >> a >> b >> c;
    long long ans1, ans2;
    if (c <= a) {
      ans1 = -1;
      ans2 = b;
    } else if (1.0 * c / b >= a) {
      ans2 = -1;
      ans1 = 1;
    } else {
      ans1 = 1;
      ans2 = b;
    }
    cout << ans1 << " " << ans2 << endl;
  }
  return 0;
}
