Please refer Greatest Common Divisor (GCD) and Least Common Multiple (LCM) to know the background of these topics.
Quick Links: