It is well known that if $f$,$g$ are both differentiable functions, then $fg$ is also a differentiable function. However, we know that the converse is not true. Take for example $f = |x|$ and $g = |x|$. Both functions are nondifferentiable, while their product $fg = x^2$ is clearly differentiable. Take another example $f = \theta(x)$ and $g = 1- \theta(x)$. Then $fg = 0$ is differentiable, but $f,g$ are not.
What I find interesting in this case and many other examples is that the converse seems almost true, in the sense that when $fg$ is differentiable, $f,g$ seems to behave quite nicely. In fact, they seem to be differentiable in the sense of distributions. In the case of $f = |x|$, we can schematically write $f'(x)= -1 + 2 \theta(x)$ with the understanding that this expression only makes sense when $f'$ is integrated against some other continuous function in $x$. In the case of $f = \theta(x)$. $f'(x) = \delta(x)$ which is a distribution that also makes sense only under integration.
So my question is: can we formulate a pseudoconverse to the "differentiability of product" in analysis? In particular, what, if anything, can we say about $f,g$ individually if we know that $fg$ is a standard differentiable function (and assuming that neither of $f,g$ is identically zero)? Can we say more if we demand $f,g$ to be continuous? Are the nice examples I provided just coincidences? If so, could someone provide some pathological examples to counter my expectations?