#include <bits/stdc++.h>
int N = 25;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    long long a, b, c;
    cin >> a >> b >> c;
    int a1 = -1, a2 = -1;
    if (a < c) a1 = 1;
    long long k = a * b;
    if (c < k) a2 = b;
    cout << a1 << " " << a2 << "\n";
  }
}
