#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int max_n = 2e5 + 10;
int main() {
  int t;
  cin >> t;
  long long a, b, c;
  while (t--) {
    cin >> a >> b >> c;
    int ans1, ans2;
    if (a * b <= c) {
      ans2 = -1;
      ans1 = 1;
    } else {
      ans2 = b;
      if (c > a) {
        ans1 = 1;
      } else {
        ans1 = -1;
      }
    }
    cout << ans1 << " " << ans2 << endl;
  }
  return 0;
}
