Source: http://rims.ruforum.org/240A96/kuta-factoring-with-greatest-common-factor.pdf