@robjohn: At least, I think so (admittedly this turned out to be a bit of an X-Y question, since I initially specified a weaker assumption):
Assume $G$ is a group for which DDH is hard, with generator $g$ and order $q$. Consider $(g^a, g^b, g^c)$ with $a,b$ randomly and independently selected from $\mathbb{Z}_q$ where $c$ is either $ab$ or randomly and independently chosen from the same set.
Assume that the decision problem specified above is solvable (in PPT). Take $g^a$ and $g^c$, and check if the exponents are coprime, and do the same for $g^b$ and $g^c$. If neither pair has coprime e…