#include<bits/stdc++.h>
using namespace std;
vector<int>prime(1000000);
vector<int>vis(10000001);
int k1=0;
int main() {
    vector<int>prime();
    vector<int>vis();
    int k1=0;
    auto primeadd = [&](int small, int big)  {

        int i, j;
        if (small == 1)small = 2;
        for (i = small; i <= big; i++) {
            if (vis[i] == 0)prime[k1++] = i;
            for (j = 0; j < k1; j++) {
                if (i * prime[j] > big)break;
                vis[i * prime[j]] = 1;
                if (i % prime[j] == 0)break;
            }
        }
    };
    primeadd(1,2);
}