Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- using LL = long long;
- using ULL = unsigned long long;
- const long long MOD = 1e9+7;
- #define INPUT(x) freopen(x,"r",stdin)
- #define OUTPUT(x) freopen (x,"w",stdout)
- #define pb push_back
- #define endl '\n'
- #define LCM(a,b) (a/__gcd(a,b))*b
- #define GCD(a,b) __gcd(a,b)
- #define SP(x,y) setprecision((y))<<fixed<<(x)
- #define PI acos(-1.0)
- #define distance(x1,y1,x2,y2) sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1))
- #define taratari ios_base::sync_with_stdio(0);cin.tie(NULL);
- int gcd(int a, int b)
- {
- if (a == 0)
- return b;
- return gcd(b % a, a);
- }
- int commDiv(int a, int b)
- {
- int n = gcd(a, b);
- int result = 0;
- for (int i = 1; i <= sqrt(n); i++) {
- if (n % i == 0) {
- if (n / i == i)
- result += 1;
- else
- result += 2;
- }
- }
- return result;
- }
- int main()
- {
- taratari
- int t;
- cin>>t;
- while(t--){
- LL a,b;
- cin>>a>>b;
- if(a==1 and b==1){
- cout<<"NO"<<endl;
- }
- else{
- cout<<"YES"<<endl;
- LL x = (a*b*3)-a;
- LL y = a;
- LL z = a*b*3;
- /*LL i = 2;
- while(x==y){
- z = z*i;
- x = z - a;
- y = a;
- i++;
- }*/
- cout<<x<<" "<<y<<" "<<z<<endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement