Proof: By Euclid
(related to Proposition: 7.21: Coprime Numbers form Fraction in Lowest Terms)
 For if not then there will be some numbers less than $A$ and $B$ which are in the same ratio as $A$ and $B$.
 Let them be $C$ and $D$.
 Therefore, since the least numbers of those (numbers) having the same ratio measure those (numbers) having the same ratio (as them) an equal number of times, the greater (measuring) the greater, and the lesser the lesser  that is to say, the leading (measuring) the leading, and the following the following  $C$ thus measures $A$ the same number of times that $D$ (measures) $B$ [Prop. 7.20].
 So as many times as $C$ measures $A$, so many units let there be in $E$.
 Thus, $D$ also measures $B$ according to the units in $E$.
 And since $C$ measures $A$ according to the units in $E$, $E$ thus also measures $A$ according to the units in $C$ [Prop. 7.16].
 So, for the same (reasons), $E$ also measures $B$ according to the units in $D$ [Prop. 7.16].
 Thus, $E$ measures $A$ and $B$, which are prime to one another.
 The very thing is impossible.
 Thus, there cannot be any numbers less than $A$ and $B$ which are in the same ratio as $A$ and $B$.
 Thus, $A$ and $B$ are the least of those (numbers) having the same ratio as them.
 (Which is) the very thing it was required to show.
∎
Thank you to the contributors under CC BYSA 4.0!
 Github:

 nonGithub:
 @Fitzpatrick
References
Adapted from (subject to copyright, with kind permission)
 Fitzpatrick, Richard: Euclid's "Elements of Geometry"