天天看點

A. Nastia and Nearly Good Numbers(簡單思維)

https://codeforc.es/contest/1521/problem/A

https://codeforc.es/blog/entry/90477

官方題解+代碼

A. Nastia and Nearly Good Numbers(簡單思維)
#include<bits/stdc++.h>
#define ll long long
using namespace std;



void solve() 
{
    ll a, b; cin >> a >> b;
    if (b == 1) {
        cout << "NO" << endl;
    } else {
    	cout << "YES" << endl;
    	cout << a << " " << a*b << " " << a*(b + 1) << endl;
    }
}

int main()
{
    int T;
    cin >> T;
    while (T--) 
        solve();
    return 0;
}