Using is_prime from common library.