Question: greatest common factor have to be prime?
Answer: Sometimes, two numbers do not have any prime factors in common. For example, the prime factorization of 40 is 2×2×2×5 and the prime factorization of 21 is 3×7. Since 40 and 21 have no common prime factors, they are said to be relatively prime, and their greatest common factor is 1.