Prime factors (Problem 3)