Solution (source code)

= Solution

Under $x'=x/\zeta$ and the Gaussian field rescaling $\phi'(x')=\zeta^{(d-2)/2}\phi(x)$, a mass squared has <engineering dimension> two and a quartic coupling has dimension $4-d$. Therefore
$$
\boxed{A=2,\qquad B=4-d}.
$$