Solve prime factors