Solution (source code)

= Solution

\b[Yes.] Suppose $f$ is not identically zero. Then
$$
U=\{x\in\mathbb R^2:f(x)\ne0\}
$$
is a nonempty open set, and $fg=0$ forces $g=0$ on $U$. Harmonic functions satisfy unique continuation: locally they are real parts of holomorphic functions and hence are real analytic, so a harmonic function vanishing on a nonempty open subset of a connected domain vanishes everywhere. Thus $g\equiv0$. Interchanging $f$ and $g$ proves that one factor must be identically zero.