semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int n,i,b,t,j;
    scanf("%d",&n);
    for (i=3;i<=n/2;i=i+2)
	{
		t=n-i;
		b=1;
		for (j=2;j<i;j++)	
			if (i%j==0) b=0;
		for (j=2;j<t;j++)	
			if (t%j==0) b=0;
		if (b==1) printf("%d %d\n",i,t);
	}
	return 0;
}
int main()
{
	int a,b,c,d,k,s=0,i,ch[10007]={'0'};
	
	for(a=2;a<=10000;a++)
	{
	for(i=1,k=0;i<=a;i++)
	{
		b=a%i;
		if(b==0)
			k++;
		else
			s++;
	}
	if(k==2)
		ch[a]=1;
	
	}
	scanf("%d",&c);
	for(d=2;d<=(c/2);d++)
    {    if(ch[d]*ch[c-d]==1)
			printf("%d %d\n",d,c-d);

	}
	return 0;
}
int main(){
	int m,i,j,t,k;
	scanf("%d",&m);
	for(i=3;i<=m/2;i=i+2){
		for(j=3;j<i;j=j+2)
			if(i%j==0)
				break;
		if(j<i)
			continue;
		else{
			t=m-i;
			for(k=3;k<t;k=k+2)
				if(t%k==0)
					break;
			if(k==t)
				printf("%d %d\n",i,t);
		}
	}
	return 0;
}
int main()
{
	int m,i,j,k=0,s;
	int a[10000];
	int *p=a;
	
	scanf("%d",&m);

	for(i=3;i<m;i+=2)
	{
		s=0;
		for(j=2;j<i;j++)
		{
			if(i%j==0)
			{
				s=1;
			}
		}
		if(s);
		else
		{
			*(p+k)=i;
			k++;
		}
	}
	for(i=0;i<=k;i++)
	{
		for(j=i;j<=k;j++)
		{
			if(a[i]+a[j]==m)
				printf("%d %d\n",a[i],a[j]);
		}
	}
	return 0;
}
int JudgePrime(int n);
int JudgeOdd(int n);
void f(int n);
int main()
{
   int num;
   cin>>num;
   f(num);
   return 0;
}
void f(int n)
{
   int i;
   for(i=2;i<=n/2;i++)
   {
      if(JudgePrime(i)==1 
      && JudgeOdd(i)==1 
      && JudgePrime(n-i)==1 
      && JudgeOdd(n-i)==1) 
      cout<<i<<' '<<n-i<<endl;
   }
}
int JudgePrime(int n)
{
   int k,i;
   k=sqrt(n);
   if(n==2) return 1;
   else 
   {
      for(i=2;i<=k;i++)
      {
          if(n%i==0) return 0;
      }
   }
   return 1;
}
int JudgeOdd(int n)
{
   if(n%2==1) return 1;
   else return 0;
}
int main()
{
	int m, i, j, n, sqrti, sqrtn;
	scanf("%d",&m);
	if(m>=6 && m<=10000 && m%2==0)
	{
		for(i=3; i<=m/2; i+=2)
		{
			sqrti=(int)sqrt(i);
			for(j=3; j<=sqrti; j+=2)
			{
				if(i%j==0)
					break;
			}
			if(j>sqrti)
			{
				n=m-i;
				sqrtn=(int)sqrt(n);
				for(j=3; j<=sqrtn; j+=2)
				{
					if(n%j==0)
						break;
				}
				if(j>sqrtn)
					printf("%d %d\n",i,n);
			}
		}
	}
	return 0;
}
int d(int x);
int main()
{int n,r[100],t[100];
cin>>n;int w=1;
for(int i=3;i<n/2+1;i++)
{ if(d(i)==1&&d(n-i)==1)
{r[w]=i;t[w]=n-i;cout<<r[w]<<' '<<t[w]<<endl;w++;}

}

}
int d(int x)
{int m,c=1,q;
    for(int i=2;i<x;i++)
    { m=x%i;c++;
if(m==0)
{c=0;break;}

    }
    if(c!=0) q=1;
    else q=0;return q;
}
int main()
{
	int n,i,j,p;
	scanf("%d",&n);
	char a[10001]={0};
	i=2;
	while(i<n)
	{
		for(j=i+1;j<n;j=j+1)
			if (j%i==0)  a[j]=1;
		i++;
		for(;i<n;i=i+1)
			if (a[i]==0)  break;
	}
	p=0;
	for(i=3;i<=(n/2);i=i+1)
		if ((a[i]==0)&&(a[n-i]==0))
			{
			if (p) printf("\n");
			p=p+1;
			printf("%d %d",i,n-i);
			}
	return 0;
}
int main ()
{
	int m,a,b,i;
	scanf("%d",&m);
	for (a=3;a<=m/2;a+=2)
	{
		for(i=2;i<=sqrt(a);i++)
			if (a%i==0) break;
		if (i>sqrt(a))
			b=m-a;
		else 
			continue;
		
		for(i=2;i<=sqrt(b);i++)
			
			if (b%i==0)break;
		if (i>sqrt(b))
			printf("%d %d\n",a,b);
		
	}
	return 0;
}
int main()
{
	int a,b,c,d,m,i,j;
	scanf("%d",&m);
	for(a=2;a<=m;a++)
	{
		for(b=a;b<=m;b++)
		{
			if(a+b==m)
			{
				c=1;
			for(i=2;i<=sqrt(a);i++)
				
			{
					if(a%i==0) 
					c=0; 
			}
		    d=1;
			for(j=2;j<=sqrt(b);j++)
			{
					if(b%j==0) 
					d=0;
			}
							
				
	if(c!=0)
	if(d!=0) printf("%d %d\n",a,b);
				

		}
		}
	}
	return 0;
}
int main()
{
    int m,i,j,c,d;
    scanf("%d",&m);
    for(i=3;i<=(m/2);i=i+2)
    {
        for(c=0,j=2;j<i;j++)
        {
            if(i%j!=0)
            c=c+1;
        }
        if(c==(i-2))
        {
            for(d=0,j=2;j<(m-i);j++)
            {
                if((m-i)%j!=0)
                d=d+1;
            }
            if(d==(m-i-2))
            printf("%d %d\n",i,m-i);
        }
    }
}
int main()
{
	int n,a,b,c,i,d=0,e=0;
	scanf("%d",&n);
    for( i=3;i<=n/2;i=i+2)
	{
		for( a=2;a<i;a++)
		{
			if(i%a==0)
			{d=1;break;}
			else {d=0;} 
		}
		if(d==0)
		{
		b=n-i;
		for( c=3;c<b;c=c+2)
		{
			if(b%c==0)
			
		

        {e=1;break;}
			else {e=0;} 


		}
		}
		else {continue;}
			if(e==0&&d==0)
			printf("%d %d\n",i,b);
			else{ continue;}
		
	}return 0;
}
//********************************
//*???1.cpp   **
//*?????? 1200012768 **
//*???2012.10.24  **
//*???????????  **
//********************************
int main()               
{
     int m, i, j, k;
     cin >> m;
     for (i = 3; i <= m / 2; i += 2)
     {
	  	 int root1 = sqrt(i);
	  	 for (j = 3; j <= root1; j += 2)   //???????i????? 
		 {
		  	 if (i % j == 0)
			     break;
		 }
		 if (j <= root1 )      //??i????
		     continue;         //????????????? 
		 int root2 = sqrt(m - i);  
		 for (k = 3; k <= root2; k += 2)  //??????? m - i ????? 
		 {
		  	 if((m - i) % k == 0)
                 break;
		 }
		 if (k > root2 )   //m - i ???? 
		     cout << i << " " << m - i << endl;
     }
     return 0;
}
int main()
{
	int n,i,j,t,p;
	scanf("%d",&n);
	for(i=3;i<=n/2;i++){
		t=0;
		p=0;
		for(j=2;j<=i/2+1;j++){
			while(t==0){
				if(i%j==0)t=1;
				break;	
			}
			if(t==1)break;
		}
		for(j=2;j<=(n-i)/2+1;j++){
			while(p==0){
				if((n-i)%j==0)p=1;
				break;
			}
			if(p==1)break;
		}
		if(t==0&&p==0)printf("%d %d\n",i,n-i);
	}
	return 0;
}
int main()
{
	int i,n,k,m,l;
	scanf("%d",&n);
	for(i=3;i<(n/2+1);i+=2)
	{
		m=0;
		for(k=2;k<i/2;k++)
		{
			if(i%k==0){
				m=1;
				break;
			}
		}
		if(m==0){
		for(l=3;l<((n-i)/2+1);l++)
		{
			if((n-i)%l==0){
				m=1;
				break;
			}
		}
		}
		if(m==0)printf("%d %d\n",i,n-i);
	}
	return 0;
}
int main()
{
	int m,a[2500],b=0,c=0,x,d,i,j;
	cin >> m;
	for(i=3;i<m;i++)
	{
		c=0;
		for(j=2;j*j<=i;j++)
		{
			d = i % j;
			if(d==0)
			{
				c = 1;
				break;
			}
		}
		if(c==0)
		{
			a[b] = i;
			b++;
		}
	}
	x = b;
	for(i=0;i<x;i++)
	{
		for(j=x-1;j>i-1;j--)
		{
			if(m==a[i]+a[j])
			{
				x = j;
				cout << a[i] << " " << a[j] <<endl;
				break;
			}
		}
	}
	return 0;
}
int main()
{
	int m,i,j,a,b,c;
	scanf("%d",&m);
	for(i=3;i<=(m/2);i+=2)
	{
		a=i;
		for(j=2;j<a;j++)
		{
			b=a%j;
			if(b==0)
				break;
		}
		if(b==0)
			continue;
		c=m-a;
		for(j=2;j<c;j++)
		{
			b=c%j;
			if(b==0)
				break;
		}
		if(b!=0)
			printf("%d %d\n",a,c);
	}
	return 0;
}
int main() 
{
    int oushu,i,count,cha,j,k;//oushu??????i,j,k?????cha??i????? 
    cin>>oushu;
    for(i=3;i<=oushu*0.5;i++)//i?????cha 
    {
                        cha=oushu-i;
                        count=0;
                        for(j=2;j<i;j++) 
                        {
                                          if (i%j==0) count++;//??????????count?? 
                        }
                        for(k=2;k<cha;k++)
                        {
                                         if (cha%k==0) count++;
                        }
                        if (count==0) cout<<i<<" "<<cha<<endl;//????????? 
    }
    return 0;
    }
int prime(int k);

int main()
{
    int n;
    cin>>n;
    
    for (int i=2;i<=n/2;i++)
       if (prime(i)&&prime(n-i)) cout<<i<<' '<<n-i<<endl;
    
}

int prime(int k)
{
    if (k==2) return 1;
    for (int i=2;i<=k/2;i++) 
    if (k%i==0) return 0;
    return 1;
}
void main()
{
	int m,a,b,c,d;
	scanf("%d",&m);
	for(a=3;a<m;a++)
	{
		for(c=2;c<=sqrt(a);c++)
				if(a%c==0)
					break;
				if(c>sqrt(a))
				{
					b=m-a;
					for(d=2;d<=sqrt(b);d++)
					{
						if(b%d==0)
							break;
					}
					if(d>sqrt(b)&&a<=b)
						printf("%d %d\n",a,b);
				}
				}
}
int work(int n)
{
	for(int i=3;i<=sqrt(n);i+=2)
	if(n%i==0)return 0;
	return 1;
}
int main()
{
	int m,i;
	cin>>m;
	for(i=3;i<=m/2;i+=2)
	{
		if(work(i)&&work(m-i))
		cout<<i<<' '<<m-i<<endl;
	}
	return 0;
}
void main()
{
	void pro(int n);
	int n;
	scanf("%d\n",&n);
	pro(n);
}
void pro(int n)
{
	int *odd(int n),*head;
	int i,j;
	head=odd(n);
	for(i=0;head[i]<=n/2;i++)
		for(j=i;head[j]!=0;j++)
		{
			if(head[i]+head[j]==n)printf("%d %d\n",head[i],head[j]);
		}
}
int *odd(int n)
{
	int i,j,k,m=0;
	int a[1000]={0};
	for(i=3;i<n;i+=2)
	{
		k=sqrt(i);
		for(j=2;j<=k;j++)
		{	if(i%j==0)break;}
		if(j>k)
		{
			a[m]=i;m++;
		}
	}
	return(a);
}
int main()
{
int k,m,n,i,j;
scanf("%d",&k);
for(m=3;m<=k;m++)
{
   n=k-m;
          for(i=2;i<m;i++)
            {
                 if (m%i==0)
                   break;
             }
          for(j=2;j<n;j++)
             {
                  if(n%j==0)
                  break;
              }
          if (i==m&&j==n)
          if (k==m+n)
        	  if(m<=n)
           printf("%d %d\n",m,n);
          }

    return 0;
}
int main()
{
	int m,n,k,a,b,i,j,l,y,z,t,s;
	scanf("%d",&m);
	n=m/2;
	k=(n+1)/2;
    for(i=1;i<=k-1;i++)
	{	
		a=2*i+1;
	    b=m-a;
		t=1;
		s=1;
		for(j=2;j<=a-1;j++)
		{
			y=a%j;
            if(y==0) t*=0;
		}
		for(l=2;l<=b-1;l++)
		{
			z=b%l;
            if(z==0) s*=0;
		}
		if(t&&s)
        printf("%d %d\n",a,b);
	 }
	 return(0);
}
//********************************
//*?????????   **
//*????? 1300012845 **
//*???2013.10.23  **
//********************************
int main ()//???
{
	int i,j,k,m,s;//??????i?k
	cin >> m;
	for (i=3; i<=m/2; i+=2)//?i?????m/2???
	{
		s=sqrt(i);
		for (j=2; j<=s;j++)
		{
			if (i%j==0)
				break;
		}
		if (j==s+1)//??????????i?????
		{
			k=m-i;
			s=sqrt(k);
			for (j=2; j<=s;j++)//??k?????
			{
				if (k%j==0)
					break;
			}
			if (j==s+1)
				cout << i << " "<< k<< endl;
		}
	}
	return 0;
}
int main()
{
	int m,n,l,i,j,a[10000],k=1;
	scanf("%d",&m);
    for(i=3;i<=m;i=i+2)
	{
		for(j=3;j<=i-1;j++)
			if(i%j==0)break;
			if(j>=i)
			{a[k]=i;
			k++;}
	}
    for(n=1;n<=k;n++)
	{for(l=n;l<=k;l++)
	if(a[n]+a[l]==m)
		printf("%d %d\n",a[n],a[l]);
	}
	
	return 0;
}
int prime(int n)
{
    int i,z=1;
    for(i=3;i<=n/2;i++)
    {
         if(n%i==0)
         {z=0;break;}
    }
    return z;
}
main()
{
      int n,i;
      scanf("%d",&n);
      for(i=3;i<=n/2;i=i+2)
      {
           if(prime(i)==1&&prime(n-i)==1)
           printf("%d %d\n",i,n-i);
      }
      getchar();
      getchar();
      return 0;
}
int main()
{
	int m,a,b,i,j;
	scanf("%d",&m);
	if(m>=6&&m<=10000&&m%2==0)
	{
		for(a=2;a<=m;a++)
		{
			for(b=2;b<=m;b++)
			{
		if(a%2!=0&&b%2!=0&&a<=b)
		{
		if(m==a+b)
		{
			for(i=2;i<a;i++)
			{if(a%i==0){
				break;
			}
			}
			if(i==a){
                  for(j=2;j<b;j++)
			{if(b%j==0){
				break;
			}
			}
				  if(j==b){
					  printf("%d %d\n",a,b);}}
		}
		}
			}
		}
	}
		return 0;
}
int sushu(int x)
{
	int a,b,t=2;
	b=sqrt(x);
	for (int i=2;i<=b;i++)
	{
		if (x%i==0)
		{
			t=i;
			break;
		}
		else {t=i+1;}
	}
	if (t>b)
		a=1;
	else a=0;
	return (a);
}
int main()
{
	int n,c;
	cin>>n;
	for (int j=3;j<=(n/2);j++)
	{
		c=n-j;
		if (sushu(c)+sushu(j)==2)
			cout<<j<<" "<<c<<endl;
	}
	return 0;
}
int main()
{
	int m,i,a,j;
	scanf("%d",&m);
	for(i=3;i<=m/2;)
	{
		for(j=2;j<=i;j++)
		{
			if(i%j==0)break;
		}
		if(j==i)
		{
			a=m-i;
			for(j=2;j<=a;j++)
			{
				if(a%j==0)break;
			}
			if(j==a)
				printf("%d %d\n",i,a);
		}
		i=i+2;
	}
	return 0;
}
void main()
{
	int m,a=3,b,i,j,z1,z2;
	scanf("%d",&m);
	while (a<=(m/2))
	{
		z1=1;
		for (i=2;i<=(int)(sqrt(a));i++) 
		{
			if (a%i==0) z1*=0;
			else z1*=1;
		}
		if (z1==1) 
		{
			b=m-a;
			z2=1;
			for (j=2;j<=(int)(sqrt(b));j++)
			{
				if (b%j==0) z2*=0;
				else z2*=1;
			}
			if (z2==1) 
				if (a+b==m) printf("%d %d\n",a,b);
		}
		a=a+2;
	}
}
int prime(int n)
{
int i;
double k=sqrt((double)n);
for(i=2;i<=k;i++)
if(n%i==0) break;
if(i>k) return 1;
else return 0;
}
int main()
{
int m;
scanf("%d",&m);
int i;
for(i=3;i<=m/2;i+=2)
if(prime(i)&&prime(m-i)) {printf("%d %d\n",i,m-i);continue;}
return 0;
}
//?????
int f(int a)
{
	int i;
	int l=(float)sqrt((float)a);
	for(i=2;i<=l;i++)
		if(a%i==0)
		{
			break;
			return 0;
		}
	if(i==l+1)
		return 1;
}
int main()
{
	int n,i;
	scanf("%d",&n);
	if (n%2!=0)
		return 0;
	else
	{
		for(i=3;i<=n/2;i=i+2)
			if(f(i)==1&&f(n-i)==1)
				printf("%d %d\n",i,n-i);
	}
	return 0;
}
int main()
{
	int m, a, b, i, j, k, l;
	cin >> m;
	for(i = 3; i < m; i = i + 2)
	{
            for(j = 3; j < i; j = j + 2)
			    if((i % j) == 0) break;
		    if(j == i)
			    a = i;
			else
				a = 0;
			b = m - a;
			for(k = 3; k < b; k = k + 2)
				if((b % k) == 0) break;
            if(k == b)
				if(((a <= b)&&(a!=0))==1)
					cout << a << " " << b << endl; 
	}
	return 0;
}
int main()
{
	int n,i,m,p,j;
	scanf("%d",&n);
	for(i=3;i<=n/2;i+=2)
	{
		for(j=3;(double)j<=sqrt((double)i);j+=2)
		{
			if(i%j==0)
				break;
		}
		if((double)j>sqrt((double)i))
		{
			m=n-i;
			for(p=3;(double)p<sqrt((double)m);p+=2)
			{
				if(m%p==0)
					break;
			}
			if((double)p>sqrt((double)m))
				printf("%d %d\n",i,m);
		}
	}
	return 0;
}
main()
{
	int a,n,i,j,b,p,x;
	scanf("%d",&a);
	for(i=3;i<=a/2;i++)
	{    j=1;
		for(n=2;n<i;n++)
		{
			if(i%n==0) j=0;
		}
		 if(j)
		{
			b=a-i; x=1;
		    for(p=2;p<b;p++)
			{
				if(b%p==0) x=0;
			}
			if(x) 
			{
				printf("%d %d\n",i,b);
			}
		}
	}
	return 0;
}
int main()
{
  int m,i,j,k;
  scanf("%d",&m);
  for(i=3;i<=m/2;i++)
{
  for(j=2;j<i;j++)
  if(i%j==0) break;

  if(j<i) continue;
    for(k=2;k<m-i;k++)

        if((m-i)%k==0) break;

  if(k<(m-i)) continue;
  printf("%d %d\n",i,m-i);
}
  return 0;
}
//*************************************
//* ????1.cpp *
//* ??????1200012844 *
//* ?????2012?10?23? *
//* ??????????? *
//**************************************

int main()
{
	int m, x, y, i, j, l, k;//????m?m???????x?y???i?j??????l?k
	cin >> m;//??????m
	for( x = 3; x <= m / 2; x += 2 )//??????3??????????????
	{
		//l = (int) sqrt(x);
		for ( i = 2; i < x ; i++ )//???2?????????
			if ((x % i) == 0) break;//?????????
			if ( i == x )//??x??????y?????
			{
				y = m - x;
				//k = (int) sqrt(y);
				for( j = 2; j < y ; j++ )//???2?????????
					if ((y % j) == 0) break;//?????????
					if ( j == y )//??y???????x y
						cout << x << ' ' << y << endl;
			}
	}
	return 0;
}
void main()
{
	int n,i,k;
	int issu(int k);
	scanf("%d",&n);
	for(i=2;i<=n/2;i++)
	{
		if(issu(i))
		{
			if(issu(n-i))
				printf("%d %d\n",i,n-i);
		}
	}
}

int issu(int k)
{
	int j,s;
	s=1;
	for(j=2;j<k;j++)
	{
		if(k%j==0)
		{
			s=0;
			return(s);
			break;
		}
		
	}
}
int main()
{
	int m,j,w,e;
	scanf("%d",&m);
	int judge(int a);
	for(j=2;j<=m/2;j++)
	{
		w=judge(j);
		e=judge(m-j);
		if(w==1&&e==1)
			printf("%d %d\n",j,m-j);
	}

	return 0;
}
int judge(int a)
{
	int i,flag=1;
	for(i=2;i*i<=a;i++)
	{
		if(a%i==0)
			{flag=0;
		break;}
	}
	return flag;
}
int main(){
    int m,i=2,j=2,a,b,n,k,l;
    scanf("%d",&m);
    n=m/2;
    while(i<=n){
                k=2;
                l=2;
                while(k<=i){
                            if(i%k==0)
                            break;
                            else
                            k++;}
                if(k==i){
                         j=m-i;
                         while(l<=j){
                                     if(j%l==0)
                                     break;
                                     else
                                     l++;}
                         if(l==j)
                         printf("%d %d\n",i,j);
                         i++;
                         }
                else{
                     i++;
                     continue;
                     }
                }
    return 0;
}
//**********************************
//*  ????homework_1.cpp        *
//*  ??????1200012884        * 
//*  ?????2012?10?22?      *
//*  ???????????        *
//**********************************

int main()
{
	int m, i, j, k, jud1, jud2;	//?????????i????????????j?????k???????????????jud1?jud2
	cin >> m;						//????
	for (i = 3;i <= (m / 2);i = i + 2)
	{
		jud1 = 1;							//???
		for (j = 3;j <= sqrt(i);j = j + 2)	//???????i???
		{
			if (i % j == 0) 
			{
				jud1 = 0;
				break;
			}
		}
		if (jud1)			//??i???
	    {
			k = m - i;		//?????
			jud2 = 1;		//???
			for (j = 3;j <= sqrt(k);j = j + 2)//???????k???
			{
				if (k % j == 0) 
				{
					jud2 = 0;
					break;
				}
			}				
		if (jud2)								//???????k???
			cout << i << " " << k << endl;		//??????
		}
	}
    return 0;
}
int main(){
	int e;
	cin>>e;
	int a = 3,b;
	while(a <= e/2){
	
	int t = 3;
	while(t < a){
		int m = a%t;
		if(m == 0)break;
		t+=2;
	}
	int q = 3;
	while(q < e - a){
		int n = (e-a)%q;
		if(n == 0)break;
		q+=2;
	}
	if(t == a && q == e-a)
		cout<<a<<" "<<e-a<<endl;
	a += 2;
	}
	return 0;
}
int main (  )
{
	int j,i,n,m;
	cin>>n;
	int sushu[9999];
	for(j=2;j<=n;j++)
	{
		for(i=2;i<=j;i++)
		{
			if(j%i==0)break;
		}
		if(i==j)sushu[j]=j;
	}
	for(m=2;m<=n/2;m++)
	{
		for(j=0;j<=n;j++)
		{
			if(m==sushu[j])for(i=0;i<=n;i++)
			{
				if((n-m)==sushu[i])
					cout<<sushu[j]<<" "<<sushu[i]<<endl;
			}
		}
	}
	return 0;
}
int f(int a)
{
    int i=2,m;
    m=sqrt(a);
    for(i=2;i<=m;i++)
    {
        if(a%i==0)break;
    }
    if(i>=m+1)return a;
    else return 0;
}
int main()
{
    int m;
    scanf("%d",&m);
    int i,p,q;
    for(i=3;i<=m/2;i=i+2)
    {
        p=f(i);q=f(m-i);
        if(p!=0&&q!=0)printf("%d %d\n",p,q);
    }


}
int main()
{
	int f(int n);
	int m,a=3,b;
	scanf("%d",&m);
	while(a<=(m/2))
	{
		if(f(a)==1)
		{
			b=m-a;
			if(f(b)==1)
			{
				printf("%d %d\n",a,b);
			}
		}
		a=a+2;
	}
}
int f(int n)
{
    int j;
	j=2;
	for(j=2;n%j!=0;j++);
    return (j>n/2?1:0); 
}
int main()                                 //???
{                                          //?????
	int m,a,b,i,k,y=1,x=1;                     //????
	cin >> m;                              //??m??
	for (a=3;a<=m/2;a=a+2)
	{
		x=1;
		y=1;
		for (i=3;i<=a-1;i=i+2)
		{
			if (a%i==0)
			{
				x=0;
				break;
			}
		}
		if (x==1)
		{
			for (k=3;k<=m-a-1;k=k+2)
			{
					if ((m-a)%k==0)
					{
						y=0;
						break;
					}
			}
			if (y==1)
			{
			cout << a << " " << m-a << endl;
			}
		}
	}
	return 0;
}
int main()
{
	int n,i,j,x,y,t;
	scanf("%d",&n);
	for(i=2;i<=(n/2.0);i++)
	{	
	  for(x=2;x<i;x++)
		{
		      y=i%x;
	    	if(y==0) break;
		}
   	if(y!=0)
		{	
		j=n-i;
		for(t=2;t<=j/2.0;t++)
		{	y=j%t;
		    if(y==0) 
			break;
		}
		if(y!=0)
			printf("%d %d\n",i,j);
		}
	}
	return 0;			
}
int sushu(int n)
{
	int i;
	int flag=1;
	for(i=2;i<n;i++)
	{
		if(n%i==0) 
		{
			flag=0;
			break;
		}
	}
	return flag;
}

int main()
{
	int m,i;
	scanf("%d",&m);
    for(i=3;i<=m/2;i=i+2)
	{
		if(sushu(i)&&sushu(m-i))
		{
			printf("%d %d\n",i,m-i);
		}
	}
	return 0;
}
int p( int n)
{int i;
if(n==3)
return 1;
else
{    for(i=2;i<n;i++)
    {if(n%i==0)
{return 0;

    }
    if(i==n-1)
    {return 1;}                    
                    }}
                    }
int main()
{int m,j;
cin>>m;
for(j=3;j<=(m/2);j++)
{if(p(j)==1)
{if(p(m-j)==1)
cout<<j<<" "<<m-j<<endl;
         }        
         }
    return 0;
    }
int su(int z)
  {
       int i=2,t=0,k=sqrt(z);
       for(i=2;i<=k;i++)
        { 
          if(z%i==0)
          break;
        }
        if(i>k)  t=1;
        return t;
}
int main()
{
    int m,i,j;
    scanf("%d",&m); 
          for(i=3;i<=m/2;i++)
           {  j=m-i;
             if(su(i)&&su(j))
             {printf("%d %d\n",i,j);
             }
		  }
      return 0;
}
int main()
{
	int prime(int);
	int n,i;
	scanf("%d",&n);
	for(i=2;i<=n/2;i++)
		if(prime(i)&&prime(n-i))
			printf("%d %d\n",i,n-i);

}

int prime(int n)
{
	int i,a=1;
	for(i=2;i<=sqrt(n)&&a==1;i++)
		if(n%i==0)
			a=0;
	return(a);
}
int main()
{
	int n,a,b,i,k;
	cin>>n;
	for(a=2;a<=(n/2);a++)
	{
		int j=0;
		b=n-a;
		for(i=2;i<=sqrt(a);i++)
		{
			if(a%i==0)
				j=1;
		}
			for(k=2;k<=sqrt(b);k++)
			{
				if(b%k==0)
					j=1;
			}


		if(j==0)
			cout<<a<<" "<<b<<endl;
	}
	return 0;
}
int main()
{int q[100000],w[100000];
int i,j,k,l,m,n,a,b,c;
scanf("%d",&n);
k=0;
for(i=3;i<=n;i++)
{
	for(j=2;j<=i-1;j++)
	{
		if(i%j==0)
		{break;}

		if(j==i-1)
		{
			k=k+1;q[k]=w[k]=i;
		}
	}
}
	

	for(l=1;l<=n;l++)
	{
		for(m=l;m<=n;m++)
			if(n==q[l]+w[m])
				printf("%d %d\n",q[l],w[m]);
	}
}
int main()
{
    int m,a[1000],s=0,i,j;
    scanf("%d",&m);
    for(i=2;i<m;i++)
    {
                    for(j=2;j<=sqrt(i);j++)
                    {
                                           if(i%j==0)
                                           break;
                    }
                    if(j>sqrt(i))
                    {
                        a[s]=i;
                        s=s+1;
                    }
    }
    for(i=0;i<s-1;i++)
    {
                    for(j=s-1;j>=i;j--)
                    {
                                      if(a[i]+a[j]==m)
                                      printf("%d %d\n",a[i],a[j]);
                    }
    }
    getchar();
    getchar();
}
int prime(int n)
{
	int i,flag = 0;
	if(n%2)
	{
		for(i = 3;i <= sqrt((double)n); i+=2)
		{
			if(n%i==0){
				flag = 1;
				break;
			}
		}
		if(flag)return 0;
		else return 1;
	}
	else return 0;
}

int main()
{
	int n,i;
	cin>>n;
	for(i = 3;i <= n/2;i+=2)
	{
		if(prime(i)&&prime(n-i))
			cout<<i<<' '<<n-i<<endl;
	}
	return 0;
}
int main()
{
	int m,i,j,k,c;
	scanf("%d",&m);
    for (i=3;i<=(m/2);i+=2)
	{
		c=1;
		for(j=3;j<i;j++)
		{
			if(i%j==0)
			{	c=0;
			break;
			}
		}
		if(c==0) continue;
		for(k=3;k<m-i;k++)
		{
			if((m-i)%k==0)
			{c=0;
			break;
			}
		}
		if(c==0) continue;	

		printf("%d %d\n",i,m-i);
	}
	return 0;
}
int sushu(int a)
{
          int i,b;
          b=(int)sqrt(a);
          for(i=2;i<=b;i++)
          {
                           if(a%i==0)
                           break;
          }
          if(i==b+1)
            return 1;
          else 
            return 0;
}
main()
{
    int m,i;
    scanf("%d",&m);
    for(i=3;i<=m/2;i++)
    {
        if(sushu(i)==1&&sushu(m-i)==1)
        {
                                      printf("%d %d\n",i,(m-i));
        }               
    }
    getchar();
    getchar();
}
//*************************
//*???2013?10?23?   *
//*??????           *
//*??????????? *
//*************************

int main ()

{
	int a, n, i, k;                                           //??????a??????n????i?k
	cin >> a;

	for(n = 3; n <= a / 2; n += 2)                            //???????????3?????????
	{
		for(i = 2; i <= n - 1; i++)                           //??n?????
		{
			if(n % i == 0)
				break;                                        //??n???????????           
			else if(i == n - 1)                               //??n??????a-n
			{
				for(k = 2; k <= a - n - 1; k++)               //??a-n?????
				{
					if((a - n) % k == 0)
						break;                                //??a-n???????????
					else if(k == a - n - 1)                   //??a-n???
						cout << n << " " << a-n << endl;      //??????
				}
			}
		}
	}

	return 0;
}
main()
{
      int a[91],m,i,j,n,k,l,t;
      a[1]=2;
      a[2]=3;
      a[3]=5;
      a[4]=7;
      n=4;       // ?????? 
      scanf("%d",&m);
      for(i=11;i<=m;i++)
         {
                        t=0;
                        for(j=1;j<=n;j++)
                        {
                                         if(i%a[j]==0) t=1;
                                         }
                        if(t==0)
                        {
                               n++;
                               a[n]=i;
                               }
                        }
      i=1;
      while(a[i]<=m/2)
         {
                      for(j=1;j<=n;j++)
                                       if(a[i]+a[j]==m)  printf("%d %d\n",a[i],a[j]);
                      i++;
                      }                      
}
int main()
{
	int n,a,b,i,j,k,l,flag=0;
	scanf("%d",&n);
	for(i=3;i<=n/2;i++)
	{flag=0;
		for(j=2;j<i;j++)
	{
		if(i%j==0)
		flag=1;}
	if(flag==0)
	{a=i;
	b=n-a;
	for(k=2;k<b;k++)
		if(b%k==0)
			flag=1;}
	if(flag==0)
		printf("%d %d\n",a,b);}
	scanf("%d",&l);
	return 0;
}
int is(int x)
{
    int i,res=1;
    if(x%2==0)res=0;
    for(i=3;i<=x/2;i++)
    {
        if(x%i==0)
        {
            res=0;
            break;
        }
    }
    return res;
}
int main()
{
    int i=3,input;
    scanf("%d",&input);
    while(i<=input/2)
    {
        if(is(i)==0||is(input-i)==0);
        else printf("%d %d\n",i,input-i);
        i++;
    }


}
int a[A]={0};
int main()
{
    int n,i,s,j;
	scanf("%d",&n);
    for(i=2;i<A;i++)
	{
		if(a[i]==0)
		{
			for(j=i<<1;j<A;j+=i)
			{
				a[j]=1;
			}
		}
	}
	for(i=3;i<=n/2;i+=2)
	{
		if(a[i]==0)
		{
			if(a[n-i]==0) printf("%d %d\n",i,n-i);
		}
	}
	return 0;	
	
}