pairing heap for primes