#include<stdio.h>
#include<math.h>
#define NN (1000001)

bool f[(1000001)];
void Cs(){for(int i=3;i<1000001;i+=2)
f[i]=true;

for(int i=3;i<1000001;i+=2)
for(int j=3;j<=sqrt((double)(i));j+=2)
{if(i%j==0){f[i]=false;break;}

}
}


int main(){


int c=0,x;
Cs();

while(1){
scanf("%d",&x);if(x==0)break;
for(int i=3;i<x;i+=2)
for(int j=x-1;j>=i;j-=2)
	if((f[i]==true&&f[j]==true)&&i+j==x){printf("%d+%d\n",i,j);c++;}

printf("%d\n",c);
c=0;
}
return 0;
}