int primes[N], cnt, vis[N];
void get_primes(int n){
for(int i = 2; i <= n;i++){
if(!vis[i]) primes[cnt++] = i;
for(int j = 0; primes[j] <= n/i; j++){
vis[primes[j]*i] = 1;
if(i%primes[j] == 0) break;
}
}
}