I'm pretty sure we can go through with bi-implications this way.

for some

since

and done.

Now if that makes you uncomfortable, and you want to do both directions, change all the above 's to 's and consider that your proof of the forward direction.

For the backwards direction, you will need to work a little harder. Personally, I'd do a proof by contradiction, employing the division algorithm.