#include <bits/stdc++.h>
#define int long long
const double eps = 1e-6;
int T, n, e, d, x, y;
bool check_int(double x) {
return fabs(floor(x) - x) < eps && fabs(ceil(x) - x) < eps;
}
signed main() {
for (std::cin >> T; T; --T) {
std::cin >> n >> d >> e;
x = n, y = d * e;
int t = (x - y + 2) * (x - y + 2) - 4 * x;
if (t < 0 || !check_int(sqrt(t))) {
std::cout << "NO\n";
continue;
}
t = sqrt(t) + x - y + 2;
if (t % 2) {
std::cout << "NO\n";
continue;
}
t /= 2;
if (!check_int(1.0 * x / t)) {
std::cout << "NO\n";
continue;
}
int q = x / t;
std::cout << std::min(t, q) << ' ' << std::max(t, q) << '\n';
}
return 0;
}