#include <bits/stdc++.h>
using namespace std;
 
#define all(c) (c).begin(), (c).end()
using ll = long long;
using ld = long double;

ll a, b;

void solve() {
    cin >> a >> b;
    ll z = a * b;
    if(a % z != 0 && z >= 2 * a){
        cout << "YES\n";
        if(z == 2 * a){
            cout << a << " " << z * z - a << " " << z * z << '\n';
        }
        else{
            cout << a << " " << z - a << " " << z << '\n';
        }
    }
    else cout << "NO\n";
}
 
int main() {
    ios_base::sync_with_stdio(NULL);
    cin.tie(0);
    cout.tie(0);
    int tt;
    cin >> tt;
    while(tt--) solve();
    return 0;
}
