I want to show, given the natural numbers $d$ and $e$:
$$\exists a, b \in \mathbb{N}$$ such that $$ \gcd(a, b) = d$$ and $$\operatorname{lcm}(a, b) = e$$ if and only if $$d \mid e$$
I think I have managed to show it one way, but not the other.
If $a$ and $b$ are defined as above I know that
$$\gcd(a,b) \cdot \operatorname{lcm}(a,b) = de = ab$$
and that $d$ divides both $a$ and $b$. So for some natural numbers $q$ and $s$:
$de = ab = ds\cdot dq \Leftrightarrow e = dsq \Rightarrow d \mid e$
I'm sorry if that was messy to read. Anyway, I wonder if what I did was ok so far, if there is a better way, and also I wonder how to show that $d \mid e$ implies $a$ and $b$ exists. Hints are good but if you wanna write the full answer that's also fine. Thanks! (Also if someone wants to edit my post to improve my notation I'll be happy to see it thanks)
For the other direction, if $d\vert e$, simply take $a:=d$ and $b:=e$, their gcd is $d$ and lcm is $e$ then.