
# include <math.h>
# include <stdio.h>
# include <malloc.h>

typedef unsigned long int term;

static term start = 2, max = 200000000;

int main (int argc, char **argv) {
    char *m = calloc(max, sizeof(char));
    term i, n;
    term done = sqrt(max);
    
    for (i = start; i < max; i++) m[i] = 1;
    for (n = start; n <= done; n++) {
	if (!m[n]) continue;
	for (i = n * 2; i <= max; i += n)
	    m[i] = 0;
    }
#ifndef NOPRINT
    for (i = start; i < max; i++)
	if (m[i])
	    printf("%ld\n", i);
#endif
}

