void getprim(){
check[1] = 1;
int sum = 0,i,j;
for(i = 2;i <= n; i++)
{
if(!check[i])
primer[sum++] = i;
for(j = 0;j < sum;j ++)/* 1 */
{
if(i*primer[j] > n)
break;
check[i*primer[j]] = 1;
if(i % primer[j] == 0)/* 2 */
break;
}
}
}