Solve prime numbers