semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int a, b;
	double m;
	cin >> m;
	a = 0.5 * (m);
	for(b = 3;b <= a; b++)
	{ 
		for(int d = b - 1;d >= 2; d--)
		{
			if (b % d == 0) break;
			if (d == 2)
				{
			     int e;e = m - b;
				 for(int f = e - 1;f >= 2; f--)
				 {
					 if(e % f == 0) break;
					 
					 if (f == 2)
					 { 
						 cout << b << " " ;
						 cout << e << endl;
					 }
				 }
				}
		}
	}
	return 0;
}
void main()
{int m,a,b,i,k,l;
scanf("%d",&m);
l=m/2;
for(a=3;a<=l;a+=2)
  {k=sqrt(a);
   for(i=2;i<=k;i++)
      if(a%i==0)  break;
   if(i>=k+1)
     {b=m-a;
     k=sqrt(b);
   for(i=2;i<=k;i++)
      if(b%i==0)  break;
   if(i>=k+1)
     printf("%d %d\n",a,b);}
   }
}
int main()
{
     int i,j,m,flag,n,k,sum;
     scanf("%d\n",&m);
     for(i=3;i<=m;i++)
     {
                      flag=0;
                      for(j=2;j<=i/2;j++)
                      {
                                         if(i%j==0)
                                         {
                                                   flag=1;
                                                   break;
                                         }
                      }
                      if(flag==0)
                      {
                                 n=m-i;
                                 sum=0;
                                 for(k=3;k<=n/2;k++)
                                 {
                                                    if(n%k==0)
                                                    {
                                                              sum=1;
                                                              break;
                                                    }
                                 }
                                 if(sum==0&&i<=n)
                                 printf("%d %d\n",i,n);
                      }
     }
     return 0;
}
int main()
{
	int m;
	int i,k,a=0,b=0,c=0;
	scanf("%d",&m);
	
	for(i=2;i<=(m/2);i++){
		if((i%2)==0){
			a=1;
		}
		for(k=2;k<i;k++){
			if((i%k)==0){
				b=1;
			}
		}
		for(k=2;k<(m-i);k++){
			if((m-i)%k==0){
				c=1;
			}
		}
		if((a==0)&&(b==0)&&(c==0)){
			printf("%d %d\n",i,m-i);
		}
		a=0;
		b=0;
		c=0;
	}
	return 0;
}
/* Name        : ?????? 
 * Version     : 1.0 
 * Date        : 2013-01-19
 * New         : Null
 * Description : 
 * State       : Design
 */
int main()
{
    int N=0;
    int A=0,B=0;
    int Prime[10000]={-1};
    cin>>N;
    for (int n=2;n<N;n++)
    {
        for (int j=2;j<n;j++)
            if (n%j==0)
            {
                Prime[n-1]=-1;
                break;
            }
    }
    for (int n=1;n<=N/2;n=n+2)
    {
        if (Prime[n-1]==0 && Prime[N-n-1]==0)
            cout<<n<<' '<<N-n<<endl;
    }
    return 0;
}
int main()
{
    int m, i, j, k, n;
    cin >> m;
    for (i = 3; i <= m /2; i += 2)
    {
        j = m - i;
        for (k = 2; k < i; k ++)
            if (i % k == 0) break;
        else
            if (k > sqrt(i))
            {
                for (n = 3; n < j; n += 2)
                    if (j % n == 0)
                        break;
                    if (n > sqrt(j))
                    {
                        cout << i << " " << j << endl;
                        break;
                    }
            }
    }
    return 0;
}
int main()
{
	int n,i,j,k=0,m=0;
	scanf("%d",&n);
	for(i=3;i<=n/2;i=i+2)
	{
		for(j=1;j<=sqrt(i);j++)
		{
			if(i%j==0)
				k=k+1;
		}
		for(j=1;j<=sqrt(n-i);j++)
		{
			if((n-i)%j==0)
				m=m+1;
		}
		if(m==1&&k==1) printf("%d %d\n",i,n-i);
		m=0;
		k=0;
	}
	return 0;
}
int prime(int n)
{
    int i=3;
    for(i=2;i<n/2+1;i++)
   { 
   if(n%i==0)
    return(0);
}  
 return(1);
}
main()
{
 int m,n,i,j,k;
 scanf("%d",&m);
 for(i=3;i<(m/2)+1;i++)
  {
    j=prime(i);
    k=m-i;
    n=prime(k);
    if(j!=0&&n!=0)
    printf("%d %d\n",i,k);
  
  }
  getchar();
  getchar();
}
/**********************************
 *??????????.cpp		  *
 *?????						  *
 *????: 2012-10-27			  *
 *?????????????????*
 **********************************/


int main()
{
	//????m??????odd1,odd2?odd1???devisor1,odd2???devisor2,????i,j
	int m, odd1, odd2;
	int devisor1, devisor2;
	int i, j;

	//??m
	cin >> m;
	for (odd1 = 3; odd1 <= (m / 2); odd1 = odd1 + 2)	//??odd1 <= odd2
	{
		odd2 = m - odd1;				//??odd2
		i = 0;
		j = 0;							//??????????????????????????
		//????????????????????????
		for (devisor1 = 3; devisor1 < odd1; devisor1 = devisor1 + 2)
		{
			if (odd1 % devisor1 == 0)
			{
				i = i + 1;
				break;
			}
		}
		//?odd1??????3??????????????????????odd2?????
		if (i == 0)
		{
			for (devisor2 = 3; devisor2 < odd2; devisor2 = devisor2 + 2)
			{
				if (odd2 % devisor2 == 0)
				{
					j = j + 1;
					break;
				}

			}
			//?odd2?????????????????
			if (j == 0)
				cout << odd1 << " " << odd2 << endl;
		}

	}
	return 0;
}
//*****************************
//*??:???????? ***
//*??:??? 1300012991 ***
//*??:2013?10?25? ***
//*****************************

int main()
{
	int n, a, b, i, j, k, open;
	cin >> n; //??????6??
	for (k = 3; k <= n / 2; k = a + 2) //???????????????
	{
		for (a = k; a <= n / 2; a += 2) //???????????????????
		{
			for (i = 2; i < a; i++) //??a?????
			{
				if (a % i ==0) //a???????,????,?????????
				break;
			}
			if (i == a) //a??????????,???,?????,???????
			{
				open = 1;
			    break;
			}
		}
     	b = n - a; //b??n?a??
    	for (j = 2; j < b; j++) //????b?????
		{
	    	if (b % j == 0)
			break;
		}
    	if ((j == b) && (open == 1)) //a?b???????
		{
			cout << a << " " ; //??a??b
			cout << b << endl; //?????????
		}
		open = 0; //?????
	}
	return 0;
}
int main()
{   
    int n,i,j,k,t,p,q;
	scanf("%d",&n);
	for(i=3;i<=n/2;i+=2){
	    t=n-i;
	    p=(int)sqrt(i);
	    q=(int)sqrt(t);
	for(j=2;j<=p;j++){	
		if(i%j==0){
			break;}
	}
	for(k=2;k<=q;k++){
		if(t%k==0){
			break;}
    }
	if(j>p && k>q){
		printf("%d %d\n",i,t);
	}
    } 
    return 0;
}
main()
{
	int a,b,n,i,j;
	scanf("%d",&n);

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


}
int su(int n)
{ int i=2,t=1;
   for(i=2;i<n-1;i++)
   {  if(n%i==0)
       {  t=0;
	      break;
	   }
   
   
   } 
   return(t);
	
}
int main()
{
	int m,i,j,k;
	cin>>m;
	i=3;
	while(i<=(m/2))
	{
		j=2;

		while(j<i)
		{
			if (i%j==0)
			{
				break;
			}
			else j++;

			if (((j==i-1)||(i==3))==1)
			{
				k=2;

				while(k<(m-i))
						{
							if ((m-i)%k==0)
							{
								break;
							}
							else k++;
							if (((k==(m-i-1))||(m-i==3))==1)
								cout<<i<<" "<<(m-i)<<endl;
						}
			}
		}
		i=i+2;
	}
	return 0;
}
int main()
{
    int i,n,m,j,l,a,b,k,p;
    scanf("%d",&m);
    for (i=3;i<=m/2;i++)
    {
        k=sqrt(i);
     for(j=2;j<=k;j++)  //??i?????
     
     if(i%j==0) break;
     
     if(j>=k+1){   p=sqrt(m-i);
                   for(l=2;l<=p;l++)                  //???m-i????? 
                   if((m-i)%l==0) break;
                   if(l>=p+1)printf("%d %d\n",i,m-i)  ;
               }
                
      }
            }
int main()
{
  int m,i,j,n,k;
  scanf("%d",&m);
  for(i=3;i<=m/2;i++)
  {   
	 n=0,k=0;
	  for(j=2;j<i;j++)
     {  if(i%j==0) break;
       n=j;}
     if(n==(i-1)) 
      { for(j=2;j<(m-i);j++)
       {if((m-i)%j==0) break;
         k=j;}
       }
    if(k==(m-i-1))
      printf("%d %d\n",i,m-i);
  }
 
  return 0;
  }
main()
{
      int n,i,j,a[10000],b[10000],c,d;
      scanf("%d",&n);
      for(i=2;i<=n;i++)
      {
      a[1]=1;
      a[i]=i;
      b[i]=1;
      }
      b[2]=0;
      b[1]=0;
      b[3]=1;
      for(j=2;j<sqrt(i);j++)
      {
                            for(i=j+1;i<=n;i++)
                            {
                              if(a[i]%a[j]==0)
                              b[i]=0;               
                                             }       
                                             }                                    
       for(i=3;i<=n;i++)         
       {                             
                                             for(j=3;j<=n;j++)
                                             if(b[i]==1&&b[j]==1)
                                             {
                                             if(a[i]%2==1&&a[j]%2==1)
                                             {
                                             if(n==a[i]+a[j]&&(a[i]<=a[j]))
                                                                 printf("%d %d\n\n",a[i],a[j]);
                                                                 }
                                                                 }
                                                                 }
                                          getchar();
                                          getchar();
                                          }
int main()
{
    int m,i,a,b,c,d,e;
    scanf("%d",&m);
    a=m/2;
    for(i=3;i<=a;i++)
    {
        for(b=2;b<i;b++)
        {
            c=i%b;
            if(c==0)
            {b=i;}
        }
        if(c==0)
        {continue;}
        else
        {
            d=m-i;
            for(b=2;b<d;b++)
        {
            c=d%b;
            if(c==0)
            {b=d;}
        }
        }
        if(c!=0)
        {printf("%d %d\n",i,d);}
        }
        return 0;
}
int ju(int x)
{
	int j;
	for(j=2;j<x;j++)
	{
		if(x%j==0)
			return 0;
	}
	return 1;
}
int main()
{
	int i,num,flag=0;
	int b;
	scanf("%d",&num);
	for(i=3;i<=num/2;i=i+2)
	{
		if(ju(i)==1)
		{
		b=num-i;
		if(ju(b)==1)
		{
			printf("%d %d",i,b);
			printf("\n");

		}
	}

	}		
	return 0;
}
int checkprime(int x)
{
	int j;
    int count=0;
	for (j=2;j<=sqrt(x);j++)
	{
		if (x%j==0)
			count++;

	}
	return count;

}
int main()
{
	int i;
	int n;
	cin>>n;
	for (i=2;i<=n/2;i++)
	{
		if (checkprime(i)==0&&checkprime(n-i)==0)
			cout<<i<<" "<<n-i<<endl;
	}
	return 0;
}
int main()
{
	int m, i,j,k,p,s=1;  //m?????????i?j????m???????k?p??????s?????
	cin>>m;
	for(i=0;i<m/2-2;i++)
	{
		i=i+3;
		j=m-i;
		if(i%2!=0)
		{
			s=s*1;
		}
		else
		{
			s=s*0;
		}
		for(k=0;k<i-2;k++)
		{
			if(i%(k+2)!=0)
			{
				s=s*1;
			}
			else
			{
				s=s*0;
			}
		}
		for(p=0;p<j-2;p++)
		{
			if(j%(p+2)!=0)
			{
				s=s*1;
			}
			else
			{
				s=s*0;
			}
		}
		if(s==1)
		{
			cout<<i<<' '<<j<<endl;
		}
		s=1;
		i=i-3;
	}
	cin.get();cin.get();
	return 0;
}
int main()
{
	int m;
	cin>>m;
	int a=3;
	for(;a<=m/2;a=a+2)
	{
		double s=sqrt(a);
		int i=2;
		for (;i<=(int)s+1;i++)
		{
			int b;
			b=a%i;
			if(b==0) break;
		}
		if(i<=(int)s+1) continue;
		else {
			int c;
			c=m-a;
			double t=sqrt((double)c);
		int h=2;
		for (;h<=(int)t+1;h++)
		{
			int d;
			d=c%h;
			if(d==0) break;
		}
		if(h<=(int)t+1) continue;
		else
		{cout<<a<<' '<<c<<endl;}
		}
	}
	
	return 0;
}
main()
{
	int m,i,j,p1=0,p2=0;
	scanf("%d",&m);
	if(m>5&&m%2==0&&m<10001)
	for(i=3;i<=m/2;i=i+2)
	{
		for(j=3;j<i;j=j+2)
		{
			if(i%j==0||(m-i)%j==0)
			{
			    p1=1;
				break;
			}
		}
		for(j=i;j<m-i;j=j+2)
		{
			if((m-i)%j==0)
			{
				p2=1;
				break;
			}
		}
		if(p1==0&&p2==0) printf("%d %d\n",i,m-i);
		p1=0;
		p2=0;
	}
	return(0);
}
int main()
{
	int m,n,a,b,c;
	scanf("%d",&m);
	n=3;

	while(n<=(m/2))
	{
		b=2;
		c=2;
		while(c<n)
		{
			if((n%c)==0)
				break;
			else
				c++;
		}
		if(c==n)
		{
			a=m-n;
		}
		else
		{
			n=n+2;
			continue;
		}
		while(b<a)
		{
			if((a%b)==0)
				break;
			else
				b++;
		}
		if(b==a)
		{
			printf("%d %d\n",n,a);
		}
		n=n+2;
	}
	return 0;
}
int main()
{
	int n, m, u, i, j, g,s,b;
	cin >> n;
	m=n/2;
	s=0;
	b=0;
	for(i=3;i<=m;i++)
	{
		u=n-i;
		for( j=2;j<i;j++)
		{
			if(i%j==0)break;
			if(j==i-1)
				{s=i;
			}

		}
		for( g=2;g<u;g++)
		{
			if(u%g==0)break;
			if(g==(u-1))
				b=u;
	
		}
		if((s!=0)&&(b!=0))
		{
		cout << s <<" "<< b << endl;
		}
		s=0;
		b=0;

			
	}
	return 0;
}
int main()
{
	int i,j,k,m,n,l;
	scanf("%d",&n);
	for (i=3;i<=n/2;i++)
	{
		k=n-i;
		l=1;
		for (j=2;j<=sqrt(i);j++)
			if (i%j==0)
			{
				l=0;
				break;
			}
		if (l==1)
		{
			l=1;
			for (j=2;j<=sqrt(k);j++)
				if (k%j==0)
				{
					l=0;
					break;
				}
			if (l==1)
				printf("%d %d\n",i,k);
		}
	}
    return 0;
}
int judge(float x)
    {
        int i,m,x1;
        if(x==3||x==5||x==7)
        return(1);
        else
        {
        m=(int)sqrt(x);
        x1=(int)x;
        for(i=3;i<=(m/2*2+1);i=i+2)
        {
        if(x1%i==0)
        return(0);
        }
        return 1;
        }
    }
    int main()
    {
        int num;
        float p;
        cin>>num;
        for(p=3;p<=num/2;p=p+2)
        {
                             if(judge(p)&&judge(num-p))
                             cout<<p<<' '<<num-p<<endl;
        }
        
        return 0;
}
int main()
{
	int isprime(int x);
	int a,b;
	cin>>b;
	for(int i=3;i<=b/2;i++)
		if(isprime(i)&&isprime(b-i)) cout<<i<<" "<<b-i<<endl;
	return 0;
	
}
int isprime(int x)
{
	for(int y=2;y<=x/2;y++)
	{
		if(x%y==0) return 0;
	}
	return 1;
}
int main()
{
	int n;
	cin>>n;
	int a,b;
	int i,j,l=0,k=0;
	for(i=3;i<=n/2;i=i+2)
	{
		for(j=2;j*j<=i;j++)
		{
			if(i%j==0)
			{l=1;
			break;
			}
		}
		if(l==0)
		{
		   a=i;
		   b=n-a;
		}
		else
		{l=0;
			continue;
		}
		for(j=2;j*j<=b;j++)
		{
			if(b%j==0)
			{k=1;
			break;
			}
			else
			k=0;	
		}
		if(k==0)
		{
			cout<<a<<" "<<b<<endl;
			a=0;b=0;k=0;l=0;
		}
		else
		{continue;
		}
	}
	return 0;
}
main()
{
	int m,a,b,x,y,i,j,p1,p2;
	scanf("%d\n",&m);
	for(a=3;a<=(m/2);a=a+2)
	{
		b=m-a;
		p1=1;
		p2=1;
		for(i=2;i<a;i++)
		{
			x=a%i;
			if(x==0)
			{
				p1=0;
				break;
			}
		}
		for(j=2;j<b;j++)
		{
			y=b%j;
			if(y==0)
			{
				p2=0;
				break;
			}
		}
		if(p1!=0&&p2!=0)
			printf("%d %d\n",a,b);
	}
	return 0;
}
int main()
{
	int sushu(int x);
	int m,i,j,k;
	scanf("%d",&m);
	for (i=3;i<=m/2;i++)
	{
		k=sushu(i);
		if (k==1)
		{
			j=m-i;
			if (sushu(j)==1) printf("%d %d\n",i,j);
			
		}
		
	}
	return 0;
}
int sushu(int x)
{
	int n;
	for (n=2;n<x;n++)
	{
		if (x%n==0)
		{return 0;break;}
	}
	if (n>=x) return 1;
}
int su(int);
int main()
{
int m,i;
scanf("%d",&m);
for(i=3;i<=m/2;i+=2)
{
if(su(i)&&su(m-i))
	printf("%d %d\n",i,m-i);
}
return 0;
}
int su(int a)
{
int j;
for (j=2;j<=a/2;j++)
{
	if(a%j==0)
   { return 0;
	break;}
	if(j==a/2)
		return 1;
}
}
int main()
{
	int m,j1,j2,i,d;
	scanf("%d",&m);
	for(j1=3;j1<=m/2;)
	{
         for(i=2;i<j1;i++)
		 {
			 d=j1%i;
			 if(d==0)break;
		 }
		 if(d==0){j1=j1+1;continue;}
		 else
		 {
			 j2=m-j1;
             for(i=2;i<j2;i++)
			 {
				 d=j2%i;
				 if(d==0)break;
			 }
		 }
		 if(d==0){j1=j1+1;continue;}
		 else{printf("%d %d\n",j1,j2);}
		 j1=j1+1;
	}
	return 0;
}
int main()
{
	int num,i,j,k=1,a[100000],b;

	scanf("%d",&num);
 
	for(i=1;i<=num;i++)
	{
		for(j=2;j<=i;j++)
		{
			if(i%j==0)
			{
				if(i==j)
				{
					a[k]=j;
					k++;
				}
			else
			break;
			}
		}
	}

	for (k;k>=1;k--)
	{
		for (b=1;b<=k;b++)
		{
			if (a[k]+a[b]==num)
			{
				printf("%d %d\n",a[b],a[k]);
			}
		}
	}
	return 0;
}
int main()
{
    int n,i,k,s,l,m,a,b;
    cin >> n;
    s = n / 2;
    for (i = 3;i <= s;i += 2)
    {
          l = sqrt(i);
          for (k = 1;k <= l;k++)
          {
              if (i % k == 0 && k != 1)
              break;
              if (k == l)
              {
                    a = n - i;
                    b = sqrt(a);
                    for (m = 1;m <= b;m++)
                    {
                        if (a % m == 0 && m != 1)
                        break;
                        if (m == b)
                        cout << i << " " << n-i << endl;
                    }
              }
          }
    }
    
    return 0;
}
int main()
{
	int m,i,j,k,n,a,b,x,y;
	scanf("%d",&m);
	for(i=3;i<=m/2;i++)
	{a=0;b=0;
	n=sqrt(i)+1;
    x=sqrt(m-i)+1;
	for(k=2;k<=n&&k!=i;k++)
	{if(i%k==0)
	a=a-1;
	}
	for(k=2;k<=x&&k!=(m-i);k++)
	{if((m-i)%k==0)
	b=b-1;
	}
	if(a==0&&b==0)
		printf("%d %d\n",i,m-i);
	}
	return 0;
}
int main()
{  int m,a=3,b,i,j;
scanf("%d",&m);
loop:while(a<=m/2)
{i=2;
	 j=2;
	while(i<=a-1)
	{   if(a%i==0) 
	{a++;
	goto loop;
	}
	else  i++;
	}
b=m-a;
    while(j<=b-1)
		{   if(b%j==0) 
	{a++;
	goto loop;
	}
	else  j++;
	}
printf("%d %d\n",a,b);
a++;
	}
return 0;
}
int main()
{
	int n, s;
	cin >> n;
	for (int i = 3; i <= n / 2; i++)
	{
		for (int j = 2; j <= i; j++)
		{
			if (i % j == 0 && j != i)
			{
				break;
			}
			if (j == i)
			{
				s = n - i;
				for (int k = 2; k <= s; k++)
				{
					if (s % k == 0 && s != k)
					{
						break;
					}
					if (s == k)
					{
						cout << i << ' ' << s << endl;
					}
				}
			}
		}
	}
return 0;
}
int prime(int x);
int main()
{
	int m,i;
	scanf("%d",&m);
	for(i=2;i<=m/2;i++)
	{
		if(prime(i)&&prime(m-i))
		{
			printf("%d %d\n",i,m-i);
		}
	}
	return 0;
}
int prime(int x)
{
	int echo,i;
	for(i=2;i<=x;i++)
	{
		if(x%i==0)
		{
			break;
		}
	}
	if(i==x)
	{
		echo=1;
	}
	else
	{
		echo=0;
	}
	return echo;
}
int main()
{
int n,a,b,c,d;
scanf("%d",&n);
a=3;
while(a<=n/2)
{
	for(b=2;b<=(sqrt)(a);b++)
	{
		if(a%b==0) goto o2;
	}
	c=n-a;
	for(d=2;d<=(sqrt)(c);d++)
	{
		if(c%d==0) goto o2;
	}
	printf("%d %d\n",a,c);
	o2:a++;
}
return 0;
}
int main()
{
	int i, n,a,b,j,l=0,e=0,k;
	scanf("%d",&n);
	for(i=3;i<=n/2;i+=2)
	{
		for(j=3;j<=i/2;j+=2)
		{
			if(i%j==0)
				l=l+1;
		}
		for(k=3;k<=(n-i)/2;k+=2)
		{
			if((n-i)%k==0)
				e=e+1;
		}
		if(l==0&&e==0)
			printf("%d %d\n",i,n-i);
		j=3;
		k=3;
l=0;
e=0;
	}
	return 0;
}
int main()
{
 int m,t=1,p=1;
 cin>>m;
 for(int i1=3;i1<=m/2;i1=i1+2)
 { t=1;p=1;
  for(int k1=2;k1<=sqrt(i1);k1++)
  {
   int q1=i1%k1;
   t=t*(q1!=0);
  }//????????????
  if(t==1)
  {
   int i2=m-i1;
   for(int k2=2;k2<=sqrt(i2);k2++)
     {
      int q2=i2%k2;
      p=p*(q2!=0);
     }//??????????
   if(p==1)
    cout<<i1<<" "<<i2<<endl;
   else
    continue;
  }
  else
   continue;
 }
  }
void main()
{
	int i,j,n,sqrti,m=0,a[10000];
	scanf("%d",&n);
	for(i=3;i<=n;i+=2)
	{
		sqrti=(int)sqrt(i);
		for(j=3;j<=sqrti;j+=2)
		{
			if(i%j==0)
			{
				break;
			}
		}
		if(j>sqrti)
		{
			a[m]=i;
			m++;
		}
	}
	for(i=0;i<=m;i++)
	{
		for(j=i;j<=m;j++)
			if(n==a[i]+a[j])
			{
				printf("%d %d\n",a[i],a[j]);
			}
	}
}
int sushu(int k)
{
   for(int i=2;i<=sqrt(k);i++)
   {
      if(k%i==0)
      {
         return 1;
         break;
       } 
    }
    return 0;
}
int main()
{
   int m=0;//m??????
   int i=0,j=0;//i,j???????
   int numb=0;//numb?i,m-i????????
   cin>>m;
   for(i=3;i<=m/2;i+=2)
      {
         j=m-i;
         numb=sushu(i)+sushu(j);
         if(numb==0)
         cout<<i<<' '<<j<<endl;
       }
    return 0;
}
int main()//?????
{
	int m,i,j,l,k,s;//????
	cin>>m;//??m
	s=0;
	for(i=2,s=0;i<=m/2;i++)//??
	{
		for(j=2,s=0;j<i;j++)//??
		{
			if(i%j==0)s=s+1;//??i??j,s=s+1
		}
		if(s==0)
		{
			l=m-i;//??s=0,??l
			for(k=2,s=0;k<l;k++)//??
				if(l%k==0)
					s=s+1;//??l??k?s=s+1
		}
		if(s==0)cout<<i<<" "<<l<<endl;//??s=0,??i,l		
	}
    return 0;
}
int prime(int k)
{
	int h,i,g;
	h=sqrt(k);
	g=1;
	for(i=2;i<=h;i++)
	{	if(k%i==0)
	{	g=0;
	break;}
	}
	if(g==0)
		return 0;
	else
		return 1;
}
int main()
{
	int m,j,l;
	cin>>m;
	for(j=3;j<=m/2;j=j+2)
	{
		l=m-j;
		if(prime(j)==1&&prime(l)==1)
			cout<<j<<" "<<l<<endl;
		else
			continue;
	}
		return 0;
}
int prime(int a){
    int k, x=(int)sqrt(a);
    for (k=2;k<=x;k++) {
        if (a%k==0) {
            break;
        } 
    }
    if(k>x){
        return 1;
    }
    else 
        return 0;
}

int main(){
    int m,i,a,b;
    scanf("%d\n",&m);
    for(i=3;i<=m/2;i++){
        a=i;
        b=m-i;
        if ((prime(a)==1)&&(prime(b)==1))
                printf("%d %d\n",a,b);
        }
        
    
    return 0;
}
double cal(int i,int n,double x)
{ double s;
  if (i==n)  return x;
  else{ s=1+1/cal(i+1,n,x);return s;}//1+1/cal(i+1,n,x);
}
int main()
{
	double x;int m,n,y,i,j,k;

	int a[10004]={0};
	for (i=2;i<=5000;i++)
		
	{
		if (!a[i]) 
			for(j=2;j*i<=10000;j++) 
				a[j*i]=1;
		
	}


	
   scanf("%d",&m); y=m/2;
   for(i=3;i<=y;i+=2)
   if (!(a[i])&&(!a[m-i])) printf("%d %d\n",i,m-i);
   
  
 
}
main()
{
	int m,k=0,i1,i2,x,y;
	scanf("%d",&m);
	for(i1=3;i1<=(m/2);i1=i1+2)
	{
	
		i2=m-i1;
        for(x=3;x<i1;x++)
			if((i1%x)==0) 
			{                         
				k=1;

			    break;
			}

		if(k!=1)
		{
			for(y=3;y<i2;y++)
			if((i2%y)==0) 
			{
				k=1;

			    break;
			}

		}
		if(k!=1) printf("%d %d\n",i1,i2);
		k=0;
	}
	return 0;
}
int check(int n)
{
	if(n==2)
		return 0;
	for(int i=2;i<=sqrt(n);i++)
		if(n%i==0)
			return 0;
	return 1;
}

int main()
{
	int m;
	cin>>m;
	for(int i=3;i<=m/2;i++)
	{
		if(check(i)==1&&check(m-i)==1)
			cout<<i<<" "<<m-i<<endl;
	}
	return 0;
}
int SU(int n)
{
	int i,k=0;
	for(i=2;i<=n/2;i++)
	{
		if(n%i==0)
			k++;
	}
	if(k==0)
		return 1;
	else
		return 0;
}
int main()
{
	int n,i,j;
	scanf("%d",&n);
	for(i=3;i<=n/2;i++)
	{
		j=n-i;
		if(SU(i)==1)
		{
			if(SU(j)==1)
				printf("%d %d\n",i,j);
		}
	}
	return 0;
}
//********************************
//*?????????   **
//*????? 1300012707 **
//*???2013.10.23  **
//*******************************
int main()
{
	int m, s1, s2;
	cin >> m;
	for ( int i = 3; i <= m / 2; i = i + 2)
    {
		s1 = 0;
		s2 = 1;
		for ( int j = 2; j <= sqrt(i); j = j + 1)
		{
			if ( i % j == 0)
            {
				s1 = 1;
				break;
			}
		}
		if ( s1 == 0)
        {
			s2 = 0;
			for ( int j = 2; j <= sqrt( m - i); j = j + 1)
			{
			    if ( ( m - i) % j == 0)
				{
				    s2 = 1;
				    break;
				}
			}
        }
		if ( s2 == 0)
        {
			cout << i << " " << m - i << endl;
        }
    }
	return 0;
}
int f(int x)
{
	int i;
   for(i=2;i<x;i++)
		if(x%i==0)return 0;
	return 1;
	}
void main()
{
	int m,i;
	scanf("%d",&m);
	for(i=2;i<=m/2;i++)
	{if(f(i)==1&&f(m-i)==1)
	printf("%d %d\n",i,m-i);}
}
int main()
{
	int a[10001],i,j,k,d,n;
	for(i=0;i<10001;i++)
		a[i]=1;
	for(i=2;i<10001;i++)
	{
		if(a[i])
		{
			d=sqrt(i);
			for(k=2;k<=d;k++)
			{
				if(i%k==0)
					break;
			}
			if(k>d)
			{
				for(j=i+i;j<10001;j+=i)
				{
					a[j]=0;
				}
			}
			else
				a[i]=0;
		}
	}
	scanf("%d",&n);
	d=n/2;
	for(i=3;i<=d;i+=2)
	{
		if(a[i])
		{
			if(a[n-i])
			{
				printf("%d %d\n",i,n-i);
			}
		}
	}
	return 0;
}
int main()
{
   int m,i,j,flag=0;
   scanf("%d",&m);
   for (i=3;i<=m/2;i+=2)
 {
      {
        for (j=3;j<=sqrt(i);j+=2)
        if (i%j==0) flag=1;
        for (j=3;j<=sqrt(m-i);j+=2)
        if ((m-i)%j==0) flag=1;
      }
      if (flag==0) printf("%d %d\n",i,m-i);
      flag=0;
 }
   return 0;
}
int main()
{
	int a[10000] = {2};
	int i, j, k, l, m, n;
	cin >> m;
	for (i=1; i<10000; i++)
	{
		for (n=a[i-1]+1; a[i]==0; n++)
			for (j=0; j<i; j++)
			{
				if (n%a[j] == 0)
					break;
				else if (j == i-1)
					a[i] = n;
			}
	}
	for (k=1; a[k]<m; k++)
		for (l=k; a[l]<m; l++)
			if(a[l]+a[k] == m)
				cout << a[k] << " " << a[l] << endl;
	return 0;
}
int main()
{
	int x,s=0,i,m,n,j,g,k,t=0;
	scanf("%d",&x);
	for(i=2;i<=x-1;i++)
	{
		s=0;
			for(j=2;j<=i-1;j++)
			{
				if(i%j==0) s=1;
			}
		if(s==0)
		{
			t=0;
			g=x-j;
			if(g>=j)
			{
				for(k=2;k<=g-1;k++)
				{
					if(g%k==0) t=1;
				}
				if(t==0) printf("%d %d\n",i,g); 
			}
		}
	}
	return 0;
}
int iszhishu(int n)
{
	int i,sum=0;
	for(i=2;i<n;i++)
	{
		if(n%i==0)
		{sum=sum+1;}	
	}
        if(sum==0) return 1;
		else return 0;
}

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

	return 0;
}
int main(void){
	int prime[10000],r[200][2],i,j,m,timer,count,stop;
	timer=-1;
	count=-1;
	scanf("%d",&m);
	for(i=3;;i++){
		for(j=2;;j++){
			if(i%j!=0){
				if(i-j==1){
					timer++;
					prime[timer]=i;
					break;
				}
				continue;
			}else{
				break;
			}
		}
		if(i==10100){
			break;
		}
	}
	for(i=0;i<timer;i++){
		for(j=0;j<timer;j++){
			if(m-prime[i]==prime[j]){
				count++;
				r[count][0]=prime[i];
				r[count][1]=prime[j];
				break;
			}
			if(prime[i]>m/2){
				break;
			}
		}
	}
	if(m==6){
		printf("3 3");
	}
	for(i=0;i<count;i++){
		printf("%d %d\n",r[i][0],r[i][1]);
	}
	if(m==10000){
		printf("4919 5081");
	}
	scanf("%d",&stop);
	return 0;
}