1521A - Nastia and Nearly Good Numbers

发布时间 2023-09-05 19:21:42作者: 是吃可爱长大的

A. Nastia and Nearly Good Numbers

https://codeforces.com/problemset/problem/1521/A

"""
思路:
1.就是普通的打印,NO的情况是只有b=1的时候才会出现,其他的都是YES,如果不想再继续分情况就把a*b放在中间做y,或者做x也可,避免(b-1) =  1, 最后要x + y = z

"""
for line in [*open(0)][1:]:
    a, b = [int(i) for i in line.split()]
    if b == 1:
        print("NO")
    else:
        print("YES")
        print(f"{a} {a * b} {a * (b+1)}")