factorization algorithm. solve problem 3.
add ignore