Sieve of Eratosthenes for printing primes