When faced with the problem of reducing a fraction to lowest terms, it appears that currently conventional textbooks say one should do something like this: $$ \frac{408}{684} = \frac{2\times2\times2\times3\times17}{2\times2\times3\times3\times 19} = \frac{17}{19}, $$ i.e. factor both the numerator and the denominator and then cancel.
(But maybe I'm mistaken as to what the most up-to-date textbooks say.)
This becomes somewhat more onerous with things like $\dfrac{49494}{21583}.$ And considerably more onerous in some other cases whose details I leave for now to the reader's imagination.
$$ \frac{49494}{21583} = \frac{2\times3\times73\times113}{113\times191} = \frac{438}{191}. $$ Finding the prime factors in a case like $113\times191$
But Euclid's algorithm, introduced around 300 BC and thus the oldest algorithm still in standard use today, tells us that \begin{align} & \gcd(49494,21583) = \gcd(6328,21583) = \gcd(6328,2599) \\[10pt] = {} & \gcd(1130,2599) = \gcd(1130,339) = \gcd(113,339) = \gcd(113,0) = 113, \end{align} so that $$ \frac{49494}{21583} = \frac{113\times438}{113\times191}. $$ No need to search for prime factors. Divisiblity of the numerator by $73$ is irrelevant to the problem and isn't hinted at by Euclid's algorithm.
So my question involves another problem for which complete factorization seems to be the standard recommended method: $$ \sqrt{4536} = \sqrt{2\times2\times2\times3\times3\times3\times3\times7} = 2\times3\times3\times\sqrt{2\times7} = 18\sqrt{14}. $$
What about things like $\displaystyle\sqrt{159501017} = \sqrt{13\times13\times83\times83\times137}\text{ ?}$
An efficient algorithm for finding the greatest square factor would tell us that it is $1164241 = (1079)^2$ without bringing in the irrelevant divisibility of that number by $13$ and $83.$ Is there such an algorithm?