#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin.exceptions(cin.failbit);
  long long int i, j, k, t, a, b, c, x, y;
  cin >> t;
  while (t--) {
    cin >> a >> b >> c;
    if (a * b == c) {
      x = 1, y = -1;
    } else if (a * b > c) {
      y = b;
      if (a >= c)
        x = -1;
      else
        x = 1;
    } else {
      x = 1, y = -1;
    }
    cout << x << " " << y << endl;
  }
  return 0;
}
