#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  t = 1;
  cin >> t;
  while (t--) {
    long long int a, b, c;
    cin >> a >> b >> c;
    double x = c / b;
    long long int ans1 = -1;
    long long int ans2 = -1;
    if (c > a) {
      ans1 = 1;
    }
    if (a >= c) {
      ans2 = b;
    } else {
      if (a * b > c) {
        ans2 = b;
      }
    }
    cout << ans1 << " " << ans2 << endl;
  }
}
