I need a proof of the following fact: if a group $G=M \times N$ is the direct product of subgroups $M$ and $N$ such that $\lvert M \rvert$ and $\lvert N \rvert$ are relatively prime, then $\mathrm{Aut}(G) = \mathrm{Aut}(M) \times \mathrm{Aut}(N)$.
This is the way the result is recalled on some lecture notes I am reading, I think $M$ and $N$ are implicitly supposed finite (maybe $G$ also?) otherwise this does not make sense.
This should be rather standard (it is used but not proven here), but I've taken a quick look on Rotman, Roman and Robinson but none of them seems to prove this. Do you have a reference for the proof/can you share here a proof you know?
Thanks