Printing primes between 2 and 1000