#include <bitset>

const int N = (int)1e7; // 10^7

bitset <N+1> is; // 4 * N ---> N / 8 
int pn, p[N]; // p - primes, pn - number of primes 

// ALGORITHM --- A ---
void primes()
{
  for (int i = 2; i * i <= N; i++)
    if (is[i] == 0)
      for (int j = i * i; j <= N; j += i)
        is[j] = 1;

  for (int i = 2; i <= N; i++)
    if (is[i] == 0)
      p[pn++] = i;
}

// N * loglogN == N / 2 + N / 3 + N / 5 + N / 7 + ....

// p[k] ~ k * ln(k)

// N * sum { 1 / klogk } == N * loglogN

// (loglogN)' = (1 / logN) / N = 1 / NlogN


for (int a = 1; a <= N; a++)
  for (int b = 1; a * b <= N; b++)
    ;

// a=1  N/1
// a=2  N/2
// .... N/a
// sum { N / a } = N * sum { 1 / a } = N * logN