Prime factorise n , and store prime factors in set s
def factorize ( n , s ) : NEW_LINE INDENT while ( n > 1 ) : NEW_LINE INDENT z = spf [ n ] ; NEW_LINE s . add ( z ) ; NEW_LINE while ( n % z == 0 ) : NEW_LINE INDENT n //= z ; NEW_LINE DEDENT DEDENT DEDENT