semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
void main()
{
    int m,n,i,k,a[10000],j=0,p;
    scanf("%d",&m);
    for(n=3;n<m;n=n+2)
    {
    k=sqrt(n);
    for (i=2;i<=k;i++)
    {if (n%i==0) break;}

    if (i>=k+1) {a[j]=n;j++;}
    }



    for (i=0;i<j-1;i++)
        for (p=i;p<j;p++)
        {if (a[i]+a[p]==m) printf("%d %d\n",a[i],a[p]);}

}
int main()
{
int m,n,i,t,a;      //m??;n?m???;i,t=??=??,i<t;a?????
cin>>m;
if(m%2!=0)              
cout<<"input error";
else
  {n=m/2;
   for(i=3,t=m-i;i<=n;i++,t--)
     {for(a=2;a<i;a++)
       {if(i%a!=0);
        else 
          break;    
        }
       if(a==i)
         {
          for(a=2;a<t;a++)
            {if(t%a!=0);
             else 
               break;
             } 
          if(a==t)
             cout<<i<<' '<<t<<'\n';
          else;
          }
        else;
      }
    }
cin.get();cin.get();
return 0;
}
int main()
{
	int m,i,j,k,judge;
	scanf("%d",&m);
	for (i=3;i*2<=m;i+=2){
		judge=1;
		for (k=3;k*3<=i;k+=2){
			if (i%k==0) {judge=0;}
		}
		if (judge){
			j=m-i;
			for (k=3;k*3<=j;k+=2){
	     		if (j%k==0) {judge=0;}
			}
		}
		if (judge) printf("%d %d\n",i,j);
	}
	return 0;
}
int main()
{
    int i,m,j,sum;
    cin >> m;
    for(i=3;i<=m/2;i++)
   {
      sum=1;
        for(j=2;j<=(int)sqrt(i);j++)
        {
            if(i%j==0)
            {
             sum=sum*0;
            }
        }
        if(sum==1)
        {
          for(j=2;j<=(int)sqrt(m-i);j++)
          {
              if((m-i)%j==0)
              {
                  sum=sum*0;
              }
          }
        }
        if(sum==1)
        cout << i << " " << m-i << endl;
   }
return 0;
}
int pd(int x)
  {
    int z=0,i;
    if(x%2!=0)
       {for(i=3;i<=sqrt(x);i+=2)
           {if(x%i==0)
            break;
           }
         if(i>sqrt(x))
         z=1;}
         return z;
    }
         
int main()
{
    int n,a;
    scanf("%d",&n);
    for(a=3;a<=n/2;a+=2)
      {
        if(pd(a)==1&&pd(n-a)==1)
          printf("%d %d\n\n",a,n-a);
      }
 
     return 0;
}
int main()
{
    int m,i,j,k,flag,a;
    scanf("%d",&m);
    if(m>=6&&m<=10000)
    {
        for(k=3;k<=m/2;k=k+2)
        {
            flag=1;
            for(i=2;i<k;i++)
            {
                if(k%i==0)
                {
                    flag=0;
                    break;
                }
            }
            if(flag==1)
            {
                a=m-k;
                for(j=2;j<a;j++)
                {
                    if(a%j==0)
                    {
                        flag=0;
                        break;
                    }
                }
                if(flag==1)
                    printf("%d %d\n",k,a);
            }
        }
    }
    return 0;
}
int sushu(int x){
if(x==1) return 0;
if(x==2||x==3) return 1;
int m=sqrt(x);
int i;
for(i=2;i<=m;i++){
if(x%i==0) return 0;
}
if(i==m+1) return 1;
}

int main(int argc, char* argv[])
{
int m;
scanf("%d",&m);

int i;
for(i=3;i<=m/2;i+=2){
if(sushu(i)&&sushu(m-i)) printf("%d %d\n",i,m-i);}
	return 0;
}
inline int prime(int a);//????prime

int main()//?????
{
	int m,b,c;//??????m??????b??????c
	
	cin >>m;//????m
	for(b=3;b<=m/2;b++)//?b?3?m/2??
	{
  		c=m-b;//?m-b???c
		if(prime(b)==1&&prime(c)==1)//??b?c???prime?????1 
			cout <<b<<" "<<c<<endl;//???b c??
	}
    return 0;//????????????????
}  

inline int prime(int a)//??prime?????
{
    int i;//??????i
 for(i=2;i<a;i++)//?i?2?a-1??
 {
	 if(a%i==0) break;//??a?i?? ????
 }
 if(i==a)//??i==a
	 return 1;//????1?
 else return 0;//??????0?
}
int main()
{
	int m,a,b,i,sum1,sum2;
	sum1=sum2=0;
	scanf("%d",&m);
	for(a=3;a<(m/2+1);a=a+2)
	{
		b=m-a;
		for(i=1;i<=b;i++)
		{
			if(b%i==0)
			{
				sum1=sum1;
			}
			else
			{
				sum1=sum1+1;
			}
		}
		for(i=1;i<=a;i++)
		{
			if(a%i==0)
			{
				sum2=sum2;
			}
			else
			{
				sum2=sum2+1;
			}
		}
		if((sum1==b-2)&&(sum2==a-2))
		{
			printf("%d %d\n\n",a,b);
		}
		sum1=sum2=0;
	}
	return 0;
}
int i,j,n;
int prime(int a)
{
	for(i=2;i*i<=a;i++)
		if(a%i==0) return(0);
}
int main()
{
	cin>>n;
	for(j=2;j<=n/2;j++)
	{
		if(prime(j)*prime(n-j)!=0) cout<<j<<" "<<n-j<<endl;
	}
    return 0;
}
int main() 
{
    int m,a,b,i;
    scanf("%d",&m);
	for(a=3;a<=m/2;a+=2)
	{
		for(i=3;i<=a;i+=2)
			if(a%i==0)break;
		if(i<a)continue;
		else
		{
			b=m-a;
			for(i=3;i<=b;i+=2)
				if(b%i==0)break;
			if(i==b)
				printf("%d %d\n",a,b);
		}
	}
	return 0;
}
//************************************
//*??????  1300012809         **
//*???2013.10.24                 **
//*???????????           **
//************************************
int main ()
{ 
    int m,i,a,b,c,j,d,f,k,panduan;
	cin >> m ;
	c=m/2;
	for (a=3;a<=c;a=a+2)                                      //?????????3??????+2
	{
        b=m-a;                                                //???3?m????????????????
        d=sqrt(b);
		panduan=0;
		for (j=2;j<=d;j++)                                    //??????????
		{
			if (b%j==0) panduan=1;
		}
		f=sqrt(a);
		for (k=2;k<=f;k++)                                    //???????????
		{
			if (a%k==0) panduan=1;
		}
		if (panduan==0) cout << a << " " << b << endl;        //?????????
		
	}
   return 0 ;
}
void main()
{
	int su(int m);
	int n,i;

	scanf("%d",&n);
	for(i=3;i<=n/2;i++)
	{
		if(su(i)&&su(n-i))
		{
			printf("%d %d\n",i,n-i);
		}
	}
}

int su(int m)
{
	int j;
	for(j=2;j<=sqrt(m);j++)
		if(m%j==0)break;

	if(j>sqrt(m))
		return 1;
	else
		return 0;
}
int main()
{int m,p,q,i,j;
 scanf("%d",&m); 
 for(i=3;i<=(m/2);i=i+2)
 {
	 {
	 for(j=2;j<=sqrt(i);j++)
	 if(i%j==0)break;
     if(j>sqrt(i)) p=1;
	 else p=0;
     for(j=2;j<=sqrt(m-i);j++)
	 if((m-i)%j==0)break;
     if(j>sqrt(m-i))
		 q=1;
	 else q=0;
	 }
  if(p==1&&q==1)printf("%d %d\n",i,m-i);
}
return 0;
}
int main()
{
	
	int judge(int x);
		int n,i,j,d=0;
	scanf("%d",&n);
	for(i=3;i<=n/2;i++)
	{d=0;
		if(judge(i)==1)d=d+1;
        j=n-i;
        if(judge(j)==1)d=d+1;
		if(d==2)printf("%d %d\n",i,j);
		
	}
	
	return 0;
}
int judge(int x)
{
	int i;
	for(i=2;i<=x/2;i++)
		if(x%i==0) break;
	if(i>x/2) return 1;
	else return 0;
}
int main()
{
	int oNum,x1,x2,i=1,sum1=0,sum2=0,j=1,k=1;
	cin >> oNum;
	for (i=1;i<=oNum/2;i=i+2)
	{
		x1=i;
		x2=oNum-x1;
                  for (j=1;j<=x1;j++)
		{
			if (x1%j==0)
			   sum1++;
		}
		for (k=1;k<=x2;k++)
		{
			if (x2%k==0)
			   sum2++;
		}
		if (sum1==2 && sum2==2)
			cout << x1 << " " << x2 << endl;
		sum1=0;
		sum2=0;
		j=1;
		k=1;
	}
	return 0;
}
int main()
{
    int m,i,o,k,l;
    cin>>m;
    for(i=2;i<=(m/2);i++)
    {
       o=m-i;
       for(k=2;k<i;k++)
       {
          if (i%k==0) goto end;
          }
       for(l=2;l<o;l++)
       {
          if (o%l==0) goto end;
          }
       cout<<i<<" "<<o<<endl;
       end: continue;
       }
       return 0;
}
int main()
{
    int m;
    cin >> m;
    int n1, n2, i, j, p1, p2;
    double a, b;
    for(n1 = 3; n1 <= m / 2; n1 += 2)
    {
        n2 = m - n1;
        a = sqrt(n1);
        b = sqrt(n2);
		//cout << a << b <<endl;
        for(i = 2; i <= a; i++)
        {
            if(n1 % i == 0)
				break;
        }
        if(i > a )
        {
            p1 = n1;
        }
        else
        {
            continue;
        }
        for(j = 2; j <= b; j++)
        {
            if(n2 % j == 0)
				break;
        }
		if(j > b )
		{
			p2 = n2;
		}
		else
		{
			continue;
		}
		cout << p1 << " " << p2 << endl;
    }
    return 0;
}
int prime(int a);
int main()
{
	int i=3,m,d;
	cin>>m;
	for(i=3;i<=m/2;i+=2)
	{
		if(prime(i)!=0)
		{
			d=m-i;
			if(prime(d)!=0)
			{
				cout<<i<<" "<<d<<endl;
			}
		}
	}
	return 0;
}

int prime(int a)
{
	int e=1,i=3;
	if(a<7)
		a+=8;
	else
		if(a==7)
			return 1;
	for(i=3;i<=sqrt(a*1.0);i+=2)
	{
		e*=a%i;
		if(e!=0)
			e=1;
	}
	if(e!=0)
		return 1;
	else
		return 0;
}
int main()
{
 int prime(int );
 int m;
 scanf("%d",&m);
 int a,b;
 for(a=3;a<=m/2;a=a+2)
 {
  if(prime(a))
  {
   b=m-a;
   if(prime(b))
    printf("%d %d\n",a,b);
  }
 }
 
 return 0;
}

int prime(int n)
{
 int i,k=sqrt(n);
 for(i=2;i<=k;i++)
 {
  if(n%i==0) break;
 }
 if(i>k) return 1;
 else return 0;
}
int main ()
{
	int m = 0;												//??????m 
	int t1 = 0;												//??i??????? 
	int t2 = 0;												//??i0??????? 
	int t = 0;												//t1?t2???????i?i0??????? 
	int i0 = 0;
	cin >> m;
	int f ( int x );										//?????????????f 
	for ( int i = 3; i <= m/2; i ++ )						//??????????? 
	{
		t1 = f ( i );
		i0 = m - i;
		t2 = f ( i0 );
		t = t1 + t2;
		if ( t == 2 ) cout << i << " " << i0 << endl;
		i = i + 1;
	}
	return 0;
}
int f ( int x )												//???????????f 
{
	int z = 0;												//???????????????? 
	if ( x == 3 ) z = 1;
	else
	{
		int k = 0;
		for ( int j = 3; j < x; j ++ )
		{
			int y = 0;
			y = x % j;
			if ( y == 0 ) k = k + 1;
		}
		if ( k == 0 ) z = 1;
		else
			z = 0;
	}
	return z;
}
int main()
{
	int m,p[1229],i,j,a,x=0,k,l;
	for(i=3;i<10000;i++)
	{
		a=sqrt(i);
		for(j=2;j<=a+1;j++)
		{
			if(i%j==0) break;
			if(j==a+1)
			{
				p[x]=i;
				x=x+1;
			}
		}
	}
	scanf("%d",&m);
	for(k=0;p[k]<=m/2;k++)
	{
		for(l=k;p[k]+p[l]<=m;l++)
		{
			if(p[k]+p[l]==m)
				printf("%d %d\n",p[k],p[l]);
		}
	}
	return 0;
}
int main()
{
	int m,a=2,b,i=2,j=2;
    scanf("%d",&m);
	while(a<=m/2)
	{
		int i=2,j=2;
		while(i<a)
		{
		  if(a%i!=0)
		  i++;
		  else
		  goto loop1;
        }
	  b=m-a;
	  while(j<b)
 		{
		  if(b%j!=0)
		  j++;
		  
		  else
		  break;

		  if(j==b)
          {
          printf("%d %d\n",a,b);
		  break;
          }
        }
		loop1:a++;
    }

}
void main()
{
	int m,i,j,t,s,n;
	scanf("%d",&m);
		for(i=3;i<=m/2;i++)
		{
			t=1;s=1,n=m-i;
			for(j=2;j<=i/2;j++)
				if(i%j==0)
				{
					t=0;
					break;
				}
			for(j=2;j<=n/2;j++)
				if(n%j==0)
				{
					s=0;
					break;
				}
			if(t&&s)printf("%d %d\n",i,n);
		}
}
int main()
{
	int i,j,n,s,k,m;
	scanf("%d",&n);
	for(i=3;i<n/2+1;i+=2)
	{
		s=0;
		for(m=2;m<i;m++)
		{
			if(i%m==0)
			{
				s=1;
				break;
			}
		}
		if(s==1)
		{
			continue;
		}
		j=n-i;
		for(k=2;k<j;k++)
		{
			s=0;
			if(j%k==0)
			{
				s=2;
				break;
			}
		}
		if(s==2)
		{
			continue;
		}
		if(i+j==n)
		{
			printf("%d %d\n",i,j);
		}
	}
	return 0;
}
int main()
{
    int m,x,y,i,n;//????m  ??????x,y ????i x(y)?1?x(y)??????n
    cin >>m;
    for (x=3;x<=m/2;x++) 
       {
           n=0;              
           for (i=2;i<=x/2;i++) 
              { 
                if (x%i==0) n++;
              }
           if (n==0) 
             {
                 y=m-x;
                 for (i=2;i<=y/2;i++) 
                   { 
                      if (y%i==0) n++;
                   }
             }
           if (n==0) cout <<x <<" " <<y <<endl;
       } 
    return 0; 
}
//********************************
//*?????????    **
//*??? ??? 1300012745 **
//*???2013.10.25  **
//********************************
int main() 
{
	int m, a, b, i, n=0;
	cin>>m;
	for (a=3;a <= m / 2;a+=2)
	{
		for (i=3;i <= sqrt(a);i++)
		{
			if (a % i==0)
				n++;
		}
		if (n==0)
		{
			b=m - a;
			for (i=3;i <= sqrt(b);i++)
			{
				if (b % i==0)
					n++;
			}
			if (n==0)
				cout << a << " " << b <<endl;
		}
		n=0;  //?n????????????
	}
	return 0;
}
void main()
{
	int m,i,j,a[10000]={0};
	scanf("%d",&m);
	for(i=2;i<m;i+=2)
	{
		if((i+1)%2)
		{
			a[i]=1;
			for(j=3;j<=i;j+=2)
			{
				if((i+1)%j==0) 
				{
					a[i]=0;break;
				}
			}
		}
	}
	for(i=0;i<m/2;i++)
	{
		if(a[i]&&a[m-2-i]) printf("%d %d\n",i+1,m-1-i);
	}
}
int sushu[168]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997};
int main()
{
    int i,j,m;
    cin>>m;
    for(i=0;i<168;++i)
       for(j=i;j<168;++j)
       {
                         if(m==sushu[i]+sushu[j]) cout<<sushu[i]<<" "<<sushu[j]<<endl;
       }
    return 0;
}
/********************************************
 *@file   4.cpp                             *
 *@author ??                              *
 *@date   2013-10-28                        *
 *@description                              *
 *??????5???????               *
 ********************************************
 */
int main()
{
	int n, x, y, i, j, count = 0;
	cin >> n;
	for (x = 3; x <= n / 2; x++)
	{
		for (i = 2; i <= x / 2; i++)
		{
			if (x % i == 0)
				break;
				count++;
		}
		if (count == x / 2 - 1)
		{
			y = n - x;
			count = 0;
			for (j = 2; j <= y / 2; j++)
			{
				if (y % j == 0)
					break;
					count ++;
			}
			if (count == y / 2 - 1)
			{
				cout << x << " " << y << endl;
				count = 0;
			}
			else
				count = 0;
		}
		else
			count = 0;
	}
	return 0;
}
int main()
{
    int n,i,j,k=1,counter=0;
    int a[50000],s[50000]={0};
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {a[i]=i+1;}
    s[0]=2;
    for(i=2;i<n;i++)//???????? 
    {
                    for(j=2;j<i+1;j++)
                    {
                                      if(j==i)
                                      {
                                              if(a[i]%2==1)
                                             s[k]=a[i];
                                             k++;
                                      }
                                       if(a[i]%j==0) break;
                    }
    } 
    for(i=0;i<k-1;i++)
    {
                    for(j=i;j<k;j++)
                    {
                                    if(s[i]+s[j]==n)
                                    printf("%d %d\n",s[i],s[j]);
                    }
    }
   
}
//********************************************************
//*  ???:1.cpp                                        *
//*  ??????    1200012948                          *
//*  ????: 2012 10 22                                *
//*  ????:??????                               *
//********************************************************
//??
int main()
{   //?i?j?????
    int m, n, i, j, b;
    cin >> m;                          //????m
    for (n = 3; n <= m/2; n = n + 2)   //n???3
    {
    	for (i = 2; i <= n - 1; i++)   //???n
    	{
    		if (n % i == 0)
    			break;
    	}
    	if (i == n)
    	{
    		b = m - n;
    		for (j = 2; j <= b - 1; j++)
    	{
    		if (b % j == 0)
    		    break;
    	}
    	if (j == b)                      //??b?????
    		cout << n << " " << b << endl;
    	}
    }
    //??
    return 0;

}
int main()
{
	int i,j,k=2,t,su=1,put,temp,a[20000];
	a[0]=2;a[1]=3;
	for(i=4;i<10000;i++)
	{
		su=1;
		for(j=2;j*j<=i;j++)
		{
			if(i%j==0)su=0;
		}
		if(su==1){a[k]=i;k++;}
	}
	scanf("%d",&put);
	for(i=1;i<2000;i++)
	{
		temp=put-a[i];
		for(t=i;t<2000;t++)
		{
			if(a[t]==temp)
			{
				printf("%d %d\n",a[i],a[t]);
			}
			if(a[t]>temp)break;
		}
	}
	return 0;
}
void main()
{
	int m,q,r,i,j,a,b;
	scanf("%d",&m);
	for (q=3;q<=m/2;q++)
	{r=m-q;
	 a=0;
	 b=0;
		for (i=2;i<=sqrt(q);i++)
			if(q%i==0) a=1;
		for (j=2;j<=sqrt(r);j++)
			if(r%j==0) b=1;
		if(a==0&&b==0) printf("%d %d\n",q,r);
		
	}

}
int main()
{
	int n,i,j,k,a;
	double b;
		scanf("%d",&n);
	for(i=3;i<=2*n-1;i=i+2)
	{
		b=i;
		a=(int)sqrt(b)+1;
		for(k=2;k<a;k++)
		{
			if(i%k==0)
				break;
		}
		if(a==k)
			for(j=i;j<=n-i;j=j+2)
			{
				b=j;
				a=(int)sqrt(b)+1;
				for(k=2;k<a;k++)
				{
					if(j%k==0)
						break;
				}
				if(a==k)
					if(n==i+j)
						printf("%d %d\n",i,j);
			}
	}


	
	
	return 0;
}
int main(){ int m,i,j,k,c=0;scanf("%d",&m);
for(i=3;2*i<=m;i++){
	for(j=2;j*j<=i;j++)
	{if(i%j==0){c=1;break;}
	}for(j=2;j*j<=m-i;j++){if((m-i)%j==0){c=1;break;}}
    k=m-i;if(c==0)printf("%d %d\n",i,k);c=0;
}return 0;}
int main(int argc, char* argv[])
{
	int m,i,j,p,q;
	scanf("%d",&m);
	
	for(j=3;j<=m/2;j++){
		p=0;
	
		for(i=2;i<j;i++){if(j%i!=0)p=p+1;}
		if(p==j-2){q=0;
		
		for(i=2;i<m-j;i++){if((m-j)%i!=0)q=q+1;}
			if(q==m-j-2)
				printf("%d %d\n",j,m-j);}}
	
	return 0;
}
int main()
{
	int zhishu(int x);
	int m,i,k,n,p;
	scanf("%d",&m);
	for(i=2;i<=m/2;i++)
	{
		n=m-i;
		k=zhishu(i);
		p=zhishu(n);
		if(p==1&&k==1)
			printf("%d %d\n",i,n);
	}
	return 0;
}
int zhishu(int x)
{
	int i,j,k;
	if(x==2)
		k=1;
	else
		for(i=2;i<x;i++)
		{
			j=x%i;
			if(j==0)
				{
					k=0;
				    break;
			}
			else
				if(i==x-1)
					k=1;
		}
		return k;
}
int main()
{
    int oushu,xiao,da,i,j,panduan; 
    cin>>oushu;
    for(xiao=3;xiao<=oushu/2;xiao++)
    {  
                                         panduan=0;
                                         da=oushu-xiao;
                                         for(i=2;i<xiao;i++)     
                                         {
                                                                     if(xiao%i==0)panduan++;//??????????? ??????panduan?? 
                                         }
                                         for(j=2;j<da;j++)     
                                         {
                                                                   if(da%j==0)panduan++;//?????????????????panduan?? 
                                         }
                                         if(panduan==0)cout<<xiao<<" "<<da<<endl;//???????????panduan????????? 
       
    }
cin.get();cin.get();cin.get();
return 0;
}
int main()
{
	int m,i,j,k;
	scanf("%d",&m);
	for(i=3;i<=m/2;i=i+2){
		for(j=3;j<=i&&i%j!=0;j=j+2);
	for(k=3;k<=m-i&&(m-i)%k!=0;k=k+2);
		if(j==i&&k==m-i)	
		printf("%d %d\n",j,k);
}
	return 0;
}
int main()
{
	int m,i,j,a=0,b,c=0;
	scanf("%d",&m);
	for(i=3;i<m;i++)
	{
		for(j=2;j<=sqrt((double)i);j++) a=a+(i%j==0);
		if(a==0)
		{
			b=m-i;
			if(b>=i)
			{
			for(j=2;j<=sqrt((double)b);j++) c=c+(b%j==0);
			if(c==0) printf("%d %d\n",i,b);
			c=0;
			}
		}
		a=0;
	}
}
//********************************
//*???4.cpp   **
//*?????????   **
//*?????? 1300012838 **
//*???2013.10.23  **
//********************************

int main()
{ 
    int m, judge, k;
    cin >> m; 
    for (int i = 3; i <= m / 2; i++)
    {
        judge = 1;
        for (int j = 2; j <= sqrt((double)i); j++)
        {
            if (i % j == 0)
            {
                judge = 0;
                break;
            }
        }
        if (judge == 1)
        {
            k = m - i;
            judge = 1;
            for (int j = 2; j <= sqrt((double)k); j++)
            {
                if (k % j == 0)
                {
                    judge = 0;
                    break;
                }
            }
            if (judge == 1)
            {
                cout << i << " " << k << endl;
            }
        }
    }
    return 0;                    
}
int main()
{
 int m,n,i,j,x,y,p,q;
 scanf("%d",&m);
 n=m/2;
 i=3;
 while(i<=n)
 {
  x=sqrt(i);
  for(p=3;p<=x;p++)
  {
   if(i%p==0) break;
  }
  if(p>=x+1)
  {j=m-i;
    y=sqrt(j);
    for(q=3;q<=y;q++)
    {
     if(j%q==0) break;
     }
    if(q>=y+1)
    printf("\n%d %d\n",i,j);
   }
    i+=2;
   }
   return 0;
}
int main()
{
	int n;
	cin>>n;
	int a,b,c,d;
	for(a=3;a<=n/2;a=a+2)
	{
		for(c=2;c<=sqrt((double) a);c++) if(a%c==0) break;
		for(d=2;d<=sqrt((double)n-a);d++) if((n-a)%d==0) break;
		if(c>sqrt((double)a)&&d>sqrt((double)n-a)) cout<<a<<" "<<n-a<<endl;
	}
	return 0;		
}
int main()
{
 	int m, pin; //m???????pin??????????? 
 	
 	cin >> m; //?????? 
 	
 	for ( int i = 3; i <= m / 2 ; i += 2 ) //?????m/2???? 
 	{
	 	pin = 0; //????????pin = 0 
	 	
	 	for ( int k = 2; k * k <= i; k++ ) //??i?????????i??????? 
	 	{
		 	if ( i % k == 0 )
		 	   pin = 1;	//??i?????pin???1 
 	    }
	    
	    for ( int l = 2; l * l <= ( m - i ); l++ ) //??m-i????? 
	    {
		 	if ( ( m - i ) % l == 0 )
		 	   pin = 1; //??m-i?????pin???1
	    }	 
	 	 
	    if ( pin == 0 ) //??pin = 0??i?m-i????????? 
	 	   cout << i << " " << m - i << endl;
     }
	 
	 return 0;
}
int main()
{
	int n,a,k,m,i,j,x=0,y=0;
	int prime1,prime2;
	cin>>n;
	for (i=3;i<=n/2;i=i+2)
	{
		for (j=1;j<=i;j=j+2)
		{
			if (i%j==0) 
			{
				x++;
			}
		}
			if (x==2) prime1=1;
			else prime1=0;
			x=0;
			
			if (prime1==1)
			{
				a=n-i;
				for (m=1;m<=a;m=m+2)
				{	
					if (a%m==0)
					{
						y++;
					}
				}
					
					if (y==2) prime2=1;
					else prime2=0;
					y=0;
				
					if (prime2==1)
						cout<<i<<" "<<a<<endl;
		
				
			}
		
	}
	return 0;
}
int main()
{int i, j, k= 0,l, a[1228], m;      
 cin>> m;
 for(i= 3; i<= 9997; i= i+ 2)    
	 {l=0;
      for(j= 3; j<= sqrt(i); j++)
	  {if(i%j== 0)       
	  l++;}
		if(l==0)
		a[k++]= i;    
	 }
 for(i= 0; a[i]<= m/2; i++)     
     {for(j= i; a[j]<= m- a[i]; j++)    
        if(a[i]+ a[j]== m)
        	cout<< a[i]<< " "<< a[j]<< endl;
     }
 return 0;
}
int main()
{
	int m,a[20000],i,j,sign=0;
	
	for(i=1;i<=20000;i++)
		a[i]=-10000;
		scanf("%d",&m);
	for(i=2;i<=m;i++)
	{
		{
			for(j=2;j<i;j++)
			{
				if(i%j==0)
				sign+=1;
			}
		}
			if(sign>0)
				sign=0;
			else a[i]=i;
	}
	for(i=2;i<m;i++)
		for(j=i;j<m;j++)
			if(a[j]+a[i]==m)
				printf("%d %d\n",i,j);
	return 0;
}
int main()
{
   int m,a,b,i;
   scanf("%d",&m);
   for(a=2;a<=(m/2);a++)
   {
       b=m-a;
       for(i=2;i<a;i++)
       {if(a%i!=0)
       continue;
       else
       goto a;}
       for(i=2;i<b;i++)
       {
           if(b%i!=0)
           continue;
           else
           goto a;
       }
    printf("%d %d\n",a,b);
    a:continue;
   }
   return 0;
}
int zhiyinshu(int x)
{
	int i=2;
	while (i<x)
	{
		if (x%i==0)
		{
			return 0;
		}
		else
		{
			i++;
		}
	}
	return 1;
}
int main ()
{
    int i,j,x;
    scanf("%d",&x);
    for (i=3;i<j;i++)
    {
        j=x-i;
        if ((zhiyinshu(i)==1)&&(zhiyinshu(j))) printf("%d %d\n",i,j);
    }
    return 0;
}
int main()
{
	int a[10000],i,k,j,t,x,b,c,d,e=0;
	scanf("%d",&x);

	for(i=3,j=0;i<10000;i++)
	{
		for(e=0,k=2;k<i;k++)
		{
			t=i/k;
			if(t*k==i)
			{
				e=1;
				break;		
			}
		}
		if(e==0)
		{
			a[j]=i;
			j++;
		}
	}
	for(b=0;b<=10000;b++)
	{
		c=x-a[b];
		if(c<x/2) break;
			for(d=0;d<10000;d++)
			{
				if(c==a[d]) 
				{
					printf("%d %d\n",a[b],a[d]);
					break;
				}
			}
	}
	return 0;
}
int main()
{
    int jishu(int x);
    int sushu(int x);
    int m,a,i;
    scanf("%d",&m);
    for(i=1; i<=(m/2); i++)
    {
        if(sushu(i)&&jishu(i))
        {
            a=m-i;
            if(jishu(a)&&sushu(a))
            {
                printf("%d %d\n",i,a);
            }
        }
    }

    return 0;
}
int jishu(int x)
{
    int d;
    if(x%2==0)
        return 0;
    else
        return 1;
}
int sushu(int x)
{
    int k,i,c;
    k=sqrt(x);
    if(x<3)
    {
        return 0;
    }
    else
    {
        for(i=2; i<=k; i++)
        {
            if(x%i==0)
            {
                break;
            }
        }
        if(i>k)
        {
            return 1;
        }

        else
        {
            return 0;
        }
    }

}
int main()
{
	int n,i,j,flag;
	int m;
	scanf("%d",&n);
	flag=1;
	for(i=3;i<=n/2;i=i+2)
	{
		for(j=2;j<=i-1;j++)
		{
			if(i%j==0)
			{
				flag=-1;
				break;
			}
			flag=1;
		}
		if(flag==1)
		{
			m=n-i;
			for(j=2;j<=m-1;j++)
			{
				if(m%j==0)
				{
					flag=-1;
					break;
				}
				flag=1;
			}
		}
		if(flag==1)
			printf("%d %d\n",i,m);
	}
	return 0;
}
int main()
{
	int	m,i=3,i1=2,i2=2,x,y;
	double k ,l;
	scanf("%d",&m);
	for(;i<=m/2;i=i+2)
	{
		k=sqrtf(i);
		for(i1=2;i1<=k;i1++)
		{
			if(i%i1==0)
			{
				x=i1;
				break;
			}
		}
		if(i%x==0)
			continue;
		l=sqrtf(m-i);
		for(i2=2;i2<=l;i2++)
		{
			if((m-i)%i2==0)
			{
				y=i2;
				break;
			}
		}
		if((m-i)%y==0)
			continue;
		printf("%d %d\n",i,m-i);
	}
}
int main()
{
	int i, j, m, a, b;
	scanf("%d", &m);
	for(i=3; i<=m/2; i++)
	{
		a=0;
		b=0;
		for(j=2; j<=i-1; j++)
		{
			if(i%j==0)
			{
				a=1;
			    break;
			}
		}
		if(a==0)
		{
			for(j=2; j<=m-i-1; j++)
			{
		        if((m-i)%j==0)
				{
					b=1; 
				    break;
				}
			}
			if(b==0)
                printf("%d %d\n", i, m-i);
		}
	}
	return 0;
}
int shisushu(int n);
int main(){
	int m,n;
	scanf("%d",&m);
	for(n=2;n<=m/2;n++){
		if(shisushu(n)==1){
			if(shisushu(m-n)==1){
				printf("%d %d\n",n,m-n);
			}
		}
	}
	return 0;
}
int shisushu(int n){
	int i;
	int result=1;
	for(i=2;i<=n/2;i++){
		if(n%i==0){
			result=0;
			break;
		}
	}
	return result;
}