using the prime factorisation method.