/*Starting with the name of almighty ALLAH*/
/*Solved by 'Nazmul'*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vll = vector<ll>;
using vpii = vector<pii>;
using vpll = vector<pll>;
#define endl '\n'
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x).size()
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define FAST_IO \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
const int INF = 1e9;
const ll LINF = 1e18;
const int MOD = 1e9 + 7;
const int MAXN = 2e5 + 5;
ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return (a * b) / gcd(a, b); }
bool com(int a, int b) { return a > b ? true : false; }
ll power(ll base, ll exp)
{
ll res = 1;
base %= MOD;
while (exp > 0)
{
if (exp % 2 == 1)
res = (res * base) % MOD;
base = (base * base) % MOD;
exp /= 2;
}
return res;
}
void solve()
{
int a, b, x;
cin >> a >> b >> x;
if (abs(a - b) < abs(x))
cout << -1 << " " << -1 << endl;
else
{
if (x < 0)
cout << (b - abs(x)) << " " << b << endl;
else
cout << b << " " << (b - x) << endl;
}
return;
}
int main()
{
FAST_IO
int t = 1;
cin >> t;
while (t--)
solve();
return 0;
}