Sieve of Atkin & Bernstein in C++