Checks the primes