rt,
#include <bits/stdc++.h>
#define int long long
using namespace std;
const char space=' ';
signed main(){
#ifdef LOCAL
freopen("decode.in","r",stdin);
freopen("decode.out","w",stdout);
#endif
ios::sync_with_stdio(false);
int k;
cin>>k;
while(k--)
{
int n,e,d;
cin>>n>>d>>e;
int m=n-e*d+2;
int left=0,right=m/2;
while(left+1<right)
{
int mid=left+(right-left)/2;
if(mid*(m-mid)<=n)
left=mid;
else
right=mid;
}
if(left*(m-left)==n)
cout<<left<<space<<m-left<<endl;
else
cout<<"NO"<<endl;
}
return 0;
}
大样例过了.
好人一生平安