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