Solution (source code)

= Solution

Use $|z|^2=z\bar z$ and $z-\bar z=2iy$. Then
$$
\bar z(z^2-|z|^2)=\bar z\,z(z-\bar z)=2iy|z|^2=2iy(x^2+y^2).
$$
The <real part> and <imaginary part> are therefore
$$
\boxed{0\quad\text{and}\quad2y(x^2+y^2),\ \text{respectively}.}
$$