Solve problem 27 with prime_tools.