#include <stdio.h>

int main() {
	/* when do we stop? */
	//unsigned long long END = 18446744073709551614;
	unsigned long long END = 100;

	/* stage keeps track of how much we should add to get the next number */
	unsigned int stage = 2;

	/* current is the value we are checking now */
	unsigned long long current = 11;

	/* something to store results in */
	short noPrime;

	while(current < END) {
		/* check if we have a prime on our hands */

		noPrime = 0;

		if( current%3 == 0 ) noPrime = 1;
		else if( current%5 == 0 ) noPrime = 1;
		else if( current%7 == 0 ) noPrime = 1;

		if(noPrime == 0) printf("%llu\n", current);

		/* skip numbers that can't be primes by anyway */
		if(stage == 3) {
			stage = 0;
			current += 4;
		} else {
			stage++;
			current += 2;
		}
	}

	return 0;
}
