#include<stdio.h>
int main ()
{
int N,c;
while(scanf("%d%d",&N,&c)!=EOF && N>=1 && N<=1000 && c>=1 && c<=N )
{
int a[178]={0},count=5,j,n,k=4;
a[0]=1;
a[1]=2;
a[2]=3;
for(j=3;j<=175;j++)
{
a[j]=count;
for(n=1;n<j;n++)
{
if(count%a[n]==0)
{
j--;
break;
}
}
k=6-k;
count+=k;
}
printf("%d %d",N,c);
int K,q,w,e,s,v;
printf(":");
for(K=0;a[K]<=N;K++)
{
}
if((2*c<K) || (2*c-1)<K)
{
if(K%2==1)
{
e=(K+1)/2;
for(s=e-c;s<e+c-1;s++)
{
printf("% d",a[s]);
}
}
else if(K%2==0)
{
q=K/2;
for(w=q-c;w<q+c;w++)
{
printf("% d",a[w]);
}
}
}
else if((2*c)>=K || (2*c)-1>=K)
{
for(v=0;v<K;v++)
{
printf("% d",a[v]);
}
}
printf("\n\n");
}
return 0;
}