#include <iostream>
using namespace std;
const int N = 1e7 + 10;
int a, b, cnt;
int primes[N];
bool st[N];
int get_primes(int x)
{
for (int i = 2; i <= x; i ++ )
{
if (!st[i]) primes[cnt ++] = i;
for (int j = 0; primes[j] <= x / i; j ++ )
{
st[primes[j] *...