Let $A \in \mathbb Z^{m \times n}$ be a matrix with integers and $d \in \mathbb Z$ a integer that divides every component of $A$ ($A_{ij}=d\cdot n$). Let $U \in \mathbb Z^{m \times m}$ and $V \in \mathbb Z^{n \times n}$ be unimodular matrices, is it true that $d$ divides every component of $A \iff d$ divides every component of $U A V$ .
I know that the way "$\Longrightarrow$" is true. But I struggle to show $\Longleftarrow$. I know that $\Longleftarrow$ is false if $U$ and $V$ are not unimodular. Here's an attempt of a proof I wrote :
"$\Longleftarrow$" : $UAV=d.I_m.P \implies A=d.I_m.U^{-1}P.V^{-1}\implies A=d.Q \implies$(and I know I am surely wrong here) $d$ divises every component of $A$. This seems to be a fake proof because I do not use the fact that $U$ and $V$ are unimodular and hence found a proof of statement with lots of counterexamples.