Coding challenge

Write some code that will read in two integers, $n$ and $d$. "Pretend" that $n$ is the numerator of a fraction and $d$ is the denominator. Have your code prove that the fraction can be reduced to lowest terms if you divide both $n$ and $d$ by the greatest common divisor of $n$ and $d$. Note that gcd(n,d) is an available function you can use (ex: print(gcd(25,100)) displays 25).