number theory – If d|nm and $gcd(n, m)= 1$ then exist d1, d2 such that $d=d1d2$ and $d1|n$, $d2|m$ (without Fund. Theorem of Arit)

We want to prove that if $d|nm$ and $gcd(n,m)=1$ then $d=d1d2$ where $d1|n$ and $d2|m$ and $gcd(d1,d2)=1$

We already proved it using Fundamental Theorem of Aritmethic. But we wonder if there is a way to prove it using only gcd basic theorems.

Our hints

If $d1|n$ and $d2|m$, then $d1d2|nm$

The assumption $d|nm$ is a consequence of $d|m$ $(a|b => a|bc)$

If $d|nm$ then $d|gcd(d,n) gcd(d,m)$ (Properties)

$gcd(d_1,d_2)| gcd(n,m)$ obv