#include<bits/stdc++.h>
using namespace std;
int z[10005];
int zs(int x){
int s=1;
for(int i=1;i<=x;i++){
if(x%i==0){
s=0;
}
}
if(s==1){
return true;
}else{
return false;
}
}
int main(){
int n;
int s1=0;
cin>>n;
for(int i=1;i<=n;i++){
int b=zs(i);
if(b==1){
s1++;
z[s1]=i;
}
}
if(s1==0){
cout<<"empty"<<endl;
}else{
for(int i=1;i<=s1+1;i++){
if(z[i+1]-z[i]==2){
cout<<z[i]<<" "<<z[i+1]<<endl;
}
}
}
return 0;
}