#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long a, b, c;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  int tests;
  cin >> tests;
  while (tests--) {
    cin >> a >> b >> c;
    if (a < c) {
      cout << "1 ";
    } else {
      cout << "-1 ";
    }
    if (c < a * b) {
      cout << b;
    } else {
      cout << "-1";
    }
    cout << "\n";
  }
}
