Example 25 : Using prime factorisation