A UFD (or gcd domain) satisfies Euclid's Lemma: $\ (a,b)=1,\,\ a\mid bd\,\color{#c00}{\Rightarrow}\,a\mid d.\,$ In particular
$$ a,b\mid c,\,\ (a,b)=1\,\Rightarrow\, a\mid b(c/b)\,\color{#c00}{\Rightarrow}\,a\mid c/b\,\Rightarrow\, ab\mid c$$
Remark $\, $ In particular this holds true for any domain with a Euclidean algorithm, since this implies all gcds exist, e.g. it is true for $\Bbb Z$ or $\,F[x],\,$ for $F$ a field. Follow the above link for proofs.
See here for the straightforward inductive extension to $n$ arguments.
More conceptually gcd, lcm duality shows $\,{\rm lcm}(a,b) = ab/\gcd(a,b).\,$ OP is case $\,(a,b)=1$