How to prove the following implication?
$$ \begin{cases} r\cos \theta=r'\cos \theta' \\ r\sin \theta=r'\sin \theta' \end{cases} \implies \begin{cases} r=r' \\\theta=\theta' \end{cases} \,\,\,\,\,\,\,\,\,\,\,\,\,\,\, \forall r,r'\in (0,\infty) \,\,\,\,;\,\,\,\, \forall\theta, \theta' \in (0,2\pi)$$
I tried dividing the two equation to get
$$ \begin{cases} \tan \theta=\tan\theta' \\ r\sin \theta=r'\sin \theta \end{cases} $$
But I do not see how to complete the proof correctly
We have $$r^2=r^2\cos^2\theta+r^2\sin^2\theta=(r')^2\cos^2\theta'+(r')^2\sin^2\theta'=(r')^2.$$ and thus $r=r'$. So $\cos\theta=\cos\theta'$ and $\sin\theta=\sin\theta'$, and looking at several cases (paying attention to when $\sin\theta$ or $\cos\theta$ is $0$) we can deduce that $\theta=\theta'$.