#include <stdio.h>
#include <windows.h>
#define MAX 100
bool function(int n);
int main()
{
int n,i = 0;
char ch;
int arr1[MAX],arr2[2*MAX];
int low,high;
int count1,count2 = 0;
do {
scanf("%d",&arr1[i]);
ch=getchar();
i++;
}while(ch!='\n');
for(count1=0; count1<i; count1++)
{
int flag =1;
for(low = arr1[count1]-1; low>0 && flag==1;low-=2 )
for(high = arr1[count1]-1; high>low && flag==1; high -= 2) {
if(function(low) && function(high) &&low + high == arr1[count1]) {
arr2[count2] = low;
count2++;
arr2[count2] = high;
count2++;
flag = 0;
}
}
}
for(count1=0,count2=0; count1<i; count1++) {
printf("%d",arr2[count2]);
count2++;
printf(" %d\n",arr2[count2]);
count2++;
}
return 0;
}
bool function(int n)
{
for(int i = n-1; i > 1 ; i--)
{
if(n%i ==0) return false;
}
return true;
}