#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
//#define int long long
using namespace std;

#define MAX 1000001
//#define MAX 100

set<int> primes;
bool is_prime[MAX];

void print_set(set<int> s)
{
	set<int>::iterator it = s.begin();
	printf("set (");
	while (it != s.end())
	{
		printf(" %d", *it);
		++it;
	}
	printf(" )\n");
}

signed main()
{
	rep(i,MAX) is_prime[i] = true;
	is_prime[1] = false;
	for (int i=2; i<MAX; i++)
	{
		if (is_prime[i])
		{
			primes.insert(i);
			for (int j=i*2; j<MAX; j+=i)
			{
				is_prime[j] = false;
			}
		}
	}

	print_set(primes);
}