#include using namespace std; void solve() { int D, K; cin >> D >> K; int n = 0; for (int x = (D + 1) / 2; x <= D; x ++) { int y = D - x; int m = n + 8; if (x == y || x == D) m -= 4; if (n < K && K <= m) { cout << "Yes\n" << x << " " << y << endl; return; } n = m; } puts("No"); } int main() { int Q; cin >> Q; while (Q--) solve(); }