semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
//****************************************************
//*  ? ? ?: homework.cpp                          *
//*  ?    ?: ???                                *
//*  ????: 2012?10?22?                        *
//*  ????: ??????                          *
//****************************************************


int main()
{
	int a[10001] ,i ,j ,n ;  //??A?????????? 
	cin >> n;
	for (i = 2;i <= n;i++) a[i] = 1; //???A 
	for (i = 2;i <= n/2;i++)
	{
		if (a[i])
		{
			j = i + i; //????????? 
			while (j < n)
			{  //???? 
				a[j] = 0;
				j = j + i;
			}
		}
	}
	for (i = 2;i <= n / 2; i++){
		if (a[i] && a[n - i]) cout << i << ' ' << n - i << endl;  
		//????????? 
	}
	
	return 0;
}
void main()
{
  int i,j,m,a,b;
  scanf("%d",&m);
  for(i=3;i<=m/2;i++)
{
  j=m-i;
  for(a=2;a<=sqrt(i);a=a+1)
{
 if(i%a==0) break;
}
  for(b=2;b<=sqrt(j);b=b+1)
{
 if(j%b==0) break;
}
if(a>sqrt(i)&&b>sqrt(j)) printf("%d %d\n",i,j);
}
}
main()
{
      int m;
      scanf("%d",&m);
      int i,j,judge,k,judge2;
      for (i=2;i<=m/2;i++)
      {
          judge=1;
          for (j=2;j<i/2;j++)
          {
              if (i%j==0)
                 judge=0;
          }
          if (judge==1)
          {
              k=m-i;
              judge2=1;
              for (j=2;j<k/2+1;j++)
              {
              if (k%j==0)
                 judge2=0;
              }
              if (judge2==1)
              printf("%d %d\n",i,k);
          }
      }
      getchar();
      getchar();
}
int main()
{
	int i,number,half,s1=0,s2=0,sum1=0,sum2=0,j,m,k1,k2;//??half???????s1,s2??????????????????????????????
	cin>>number;
	half=number/2;
		for(s1=3;s1<=half;s1++)
		{
			sum1=0;
			sum2=0;
			s2=number-s1;//?????????
			for(j=2;j<s1;j++)//??s1?????
			{
				k1=s1%j;
				{if(k1==0)
					sum1=sum1+1;}
			}
			for(m=2;m<s2;m++)//??s2?????
			{
				k2=s2%m;
				{if(k2==0)
					sum2=sum2+1;}
			}
			if(sum1==0&&sum2==0)
				cout<<s1<<" "<<s2<<endl;//?????????
		}
	
		return 0;



}
int main()
{
	int m, primeA, primeB;
	int i, k;
	cin >> m;
	if (m >= 6 && m <=10000 && m % 2 == 0)
	{//if
	for (primeA = 3; primeA <= m - 1; primeA +=2)
	{
		primeB = m - primeA;
		if (primeA <= primeB)
		{
			for (i = 3; i <= (int)sqrt(m); i++)
			{
				if (primeA % i == 0 && primeA != i)
				{
					break;
				}
			}
			if (i == (int)sqrt(m) + 1)
			{
				for (k = 3; k <= (int)sqrt(m); k++)
				{
					if (primeB % k == 0 && primeB != k)
					{
						break;
					}
				}
			if (k == (int)sqrt(m) + 1)
				cout << primeA << " " << primeB << endl;
			}
		}
	}
	}//if
	return 0;
}
int main()
{
    int m,i,j,n;
    scanf("%d",&m);
    int a[10001];
    n=m/2;
    for (i=2;i<=m;i++)
    	   a[i]=0;
    for(i=2;i<=n;i++)
    {

        for(j=i+i;j<=m;j=j+i)
        	a[j]=1;
    }
    for (i=2;i<=n;i++)
    {
    	if ((a[i]==0)&&(a[m-i]==0))
    		printf("%d %d\n",i,m-i);
    }
	return 0;
}
int main()
{
	int m,a,i,j,k,b,c,d,e=0;
	scanf("%d",&m);
	a=m/2;
	for(i=3;i<=a;i=i+2)
	{
		for(j=3;j<=sqrt(i);j=j+2)
		{
			b=i%j;
			if(b==0)
			{e++;break;}
		}
		c=m-i;
		for(k=3;k<=sqrt(c);k=k+2)
		{
			d=c%k;
			if(d==0)
			{e++;break;}
		}
		if(e==0)
		printf("%d %d\n",i,c);
		e=0;
	}
	return 0;
}
int main()
{
  int m,a,b;//m=????? a,b=?? 
  int i,j,k,l;
  cin>>m;
  for(a=3;a<=m/2;a++)
    {
    int j=0;
    for(i=2;i<a;i++)
      j=j+(a%i==0);
    if(j==0)
      {
        b=m-a;    
        int k=0;
        for(l=2;l<b/2;l++)
          k=k+(b%l==0);
        if(k==0)
          cout<<a<<" "<<b<<endl;    
            }
      
    
                   }
  return 0;
}
//
// ????1.cpp
// ???????????
// ?????? 1200012943
// ??:2012.10.26
//
int main()
{
	int m, n, a, b, r, i;
	cin >> m;
	n = m / 2;
	for (a = 3; a <= n; a = a + 2)
	{
		r = ceil (sqrt (a));  //?a????
        for (i = 2; i <= r; i++)
			if ((a % i) == 0) break;  //??????
			if (i == r + 1)
			{
				b = m - a;
				r = ceil (sqrt (b));  //?b????
                for (i = 2; i <= r; i++)
					if ((b % i) == 0) break;  //??????
					if (i == r + 1)
						cout << a << ' ' << b << endl;
			}
	}
	return 0;
}
int zhishu(int n)
{
    int m,d,i;
m=(int)sqrt(n);
for(i=2;i<=m;i++)
{ if(n%i==0)
   break;}
if(i==m+1)
   d=1;
   else
   d=0;
   return(d);
}
main()
{
      int p,m;
      scanf("%d",&m);
      for(p=3;p<=m/2;p++)
      {if((zhishu(p)==1)&&(zhishu(m-p)==1))
      printf("%d %d\n",p,m-p);}
      getchar();getchar();getchar();getchar();getchar();getchar();getchar();
      }
int main()
{
	int i,j,m,p=1,n,q=1;
	scanf("%d",&m);
	for(i=3;i<m/2+1;i=i+2)
	{    p=1;q=1;
		for(j=3;j<i/3+1;j=j+2)
		{
			if(i%j==0)
			{
				p=2;
				break;
			}
			else
				continue;
		}
		
if(p==1)
{
	n=m-i;
	for(j=3;j<n/3+1;j=j+2)
	{
		if(n%j==0)
			{q=2;
		break;}
		else
			continue;
	}
}else
	continue;

	if(p==1&&q==1)
		printf("%d %d\n",i,n);


		
}
}
int prime(int k)
{
int p=(int)sqrt(k);
int t;
for (t=3;t<=p;t+=2)
if (k%t==0) break;
if (t>p) return 1; else return 0;
}
main()
{
int n;
scanf("%d",&n);
if (n<=200000)
{
for (int i=3;i<=n/2;i+=2)
if (prime(i))
{
if (prime(n-i))
printf("%d %d\n",i,n-i);
}}
else printf("%d",n);
}
int main()
{
	int m,a,i,b,h=1,g=1;
	scanf("%d",&m);
	for(a=3;a<=(m/2);a+=2)
	{
		for(i=2;i<a;i++)
		{
			if(a%i==0)
			{
				h=0;
			}
		}
		for(b=2;b<(m-a);b++)
		{
			if((m-a)%b==0)
			{
				g=0;
			}
		}
		if(h==1&&g==1)
		{
			printf("%d %d\n",a,m-a);
		}
		h=1;
		g=1;
	}
	return 0;
}
int main(){
	int m,j,i,p;
	cin>>m;
	for(i=3;i<=m/2;i+=2)
	{
		p=0;
		for(j=2;j<=sqrt(i);j++)if(i%j==0){p=1;break;}
		for(j=2;j<=sqrt(m-i);j++)if((m-i)%j==0){p=1;break;}
		if(p==1)continue;
		else cout<<i<<" "<<m-i<<endl;
	}
	return 0;
}
main ()
{
int i,j,k,m,n,p;
scanf("%d",&m);
n=m/2;
for (i=1;i<=n;i++)
{
p=m-i;
for (j=2;j<=i;j++)
if (i%j==0) break;
for (k=2;k<=p;k++)
if (p%k==0) break;
if (j==i&&k==p)
printf("%d %d\n",i,p);
}
}
inline int single(int);
int main()
{
	int m,a1,a2;
	cin>>m;
	for(a1=2;a1<=m/2;a1++)
	{
		if(single(a1)==2)
	{
			a2=m-a1;
			if(single(a2)==2)
			cout<<a1<<' '<<a2<<endl;
		}
	}
  return 0;
}
inline int single(int x)
{
	int n=0;int j;
	for (j=1;j<=x;j++)
	{
		if (x%j==0)
		n=n+1;
	}
	return n;
}
int main()
{
	int m,i,j,a,b;
	scanf("%d",&m);
	i=3;
	while (i<=m/2)
	{
		a=0;
		b=0;
		j=2;
		while (j<i)
		{
			if (i%j==0) break;
			j=j+1;
		}
		if (j==i)
			a=i;
		j=2;
		while (j<m-i)
		{
			if ((m-i)%j==0) break;
			j=j+1;
		}
		if (j==m-i)
			b=m-i;
		if (a>0 && b>0)
			printf("%d %d\n",a,b);
		i=i+2;
	}
	return 0;
}
int main()
{
	int m , i , j , a, b, p , q;
	cin >> m;
	for ( i = 3; i <= m/2; i = i + 2)
	{
	    p = 0;
		q = 0;
		for ( a = 2; a< i ; a ++)
		{ 
			if ( i % a ==0)
			{ 
				p=1;
			}
		}
		if ( p==0 )
		{
			j = m - i ;
			for ( b = 2 ; b < j ; b ++)
			{
				if ( j % b == 0)
				{
					q=1 ;
				}
			}
			if ( q==0 )
			{
				cout << i << ' ' << j << endl;
			}
		}
	}
	return 0;
}
int sushu(int t)
{
	int r,cnt=0;
	r=(int)sqrt(t);
	for(int i=1;i<=r;i++)
	{
		if(t%i==0)
			cnt++;
	}
	if(cnt==1)
	{
		return t;
		cnt=0;
	}
	else
	{
		return 0;
		cnt=0;
	}
}
int main()
{
	int m,i,j;
	scanf("%d",&m);
	for(i=3;i<=(int)(m/2);i=i+2)
	{
        j=m-i;
		if(sushu(i)==i&&sushu(j)==j)
			printf("%d %d\n",i,j);
	}
	getchar();
	getchar();
}
int main(){
    int m;
    scanf("%d",&m);
    int n;
    int a=0,b=0;
    for(int i=3;i<=m/2;i=i+2){
            n=m-i;
            for(int j=3;j<=i;j++){
                    if(i%j==0){
                             a++; }}
            for(int k=3;k<=n;k++){
                    if(n%k==0){
                             b++; }}
            if(a==1&&b==1){
                           printf("%d %d\n",i,n);
                           } 
            a=0;
            b=0;
                            
    }
            
    int y;
    scanf("%d",&y);
    return 0;}
int main()
{
	int m;
	cin>>m;
	int e;
	int b=0;
	int c=0;
	for(int k=3;k<=m/2;k=k+2)
	{
		e=0;
	    for(int i=2;i<=sqrt(k);i=i+1)//??k?????
        {
		    b=k%i;
		    if(b==0)
			    e=1;
        }
	    if(e==0)//??k???
	    {
	    	c=m-k;
	    	for(int i=2;i<=sqrt(c);i=i+1)//??k?????
	            {
	    			b=c%i;
	    			if(b==0)
	    				e=1;
	    		}
	    		if(e==0)//??k???
	    			cout<<k<<" "<<c<<endl;
	    }
	}
	return 0;
}
int sushu(int n)
{
	int s=1,i;
	for(i=3;i<=sqrt(n);i+=2)
	{
		if(n%i==0)
			s=0;
	}
	return s;
}
	
void main()
{
	int i,j,m;
	scanf("%d",&m);
	for(i=3;i<=m/2;i+=2)
	{
		if (sushu(i)==1 && sushu(m-i)==1)
		{
			printf("%d %d\n",i,m-i);
		}
	}
}
int main()
{
	int m,a,b,c,d,e,f;
	scanf("%d",&m);
a=3;

	while((2*a)<=m)
{
b=m-a;
c=sqrt(a);
d=sqrt(b);
e=c;
f=d;


	
		while(e>=2)
{
if(a%e==0)
break;
else
e--;
		}
			while(f>=2)
{
if(b%f==0)
break;
else
f--;
			}
			if(e==1&&f==1)
				printf("%d %d\n",a,b);
			a++;
			
	}
return(0);
}
//***************************************
//** ????????? **
//** ?????? 1300012722 **
//** ???2013.10.24 **
//***************************************
int main()
{
	int m, a, b, c, d, i, k;              //????m??????a?b?????c?d?
	cin >> m;
	for (a = 3; a < m; a = a + 2)
	{
		b = m - a;
		if (b < a) break;                 //??b>a,????
		c = sqrt(a);                      //?a????
		for (i = 2; i <= c; i++)
			if (a % i == 0) break;
		if (i > c)                        //??a??????b?????
		{
			d = sqrt(b);
		for (k = 2; k <= d; k++)
			if (b % k == 0) break;
		if (k > d)                        //??b???????a?b??
			cout << a << " " << b << endl;
		}
	}
	return 0;
}
int a[5000];
int main()
{
	int sushu(int y);
	int x,i;
	scanf("%d",&x);
	for(i=0;i<x/2;i++)
	{
		a[i]=i+1;
	}
	for(i=2;i<x/2;i++)
	{
		if(sushu(a[i])&&sushu(x-a[i]))
				printf("%d %d\n",a[i],x-a[i]);
	}
	return 0;
}
int sushu(int y)
{
	int i;
	for(i=2;i<y/2+2;i++)
	{
		if(y%i==0)
			break;
	}
	if(i<y/2+1) 
		return 0;
	else
		return 1;
}
int main()
{
	int a,i,j,k,m;
	i=3;
	scanf("%d",&a);
	while(i<=a/2)
	{
		k=3;
		while(k<i)
		{
			if(i%k==0)break;
			k=k+2;
		}
		if(k==i)
		{
			j=a-i;
			m=3;
			while(m<j)
			{
				if(j%m==0)break;
				m=m+2;
			}
			if(m==j) printf("%d %d\n",i,j);
		}
		i=i+2;
	}
	return 0;
}
int check(int);
int main()
{
	int n,i,j;
	cin >> n;
	for(i = 2; i < n; i++)
	{
		if((i % 2 != 0)&&(check(i)))
		{
			for(j = i; j < n; j++)
			{
				if((j % 2 != 0)&&(check(j)))
					if(i + j == n)
						cout << i << " " << j << endl;
			}
		}
	}
	return 0;
}
int check(int m)
{
	if(m == 2)
		return 1;
	int i,j;
	j = sqrt(m);
	for(i = 2; i <= j; i++)
	{
		if(m % i == 0)
			break;
	}
	if(i == j + 1)
		return 1;
	else
		return 0;
}
void main()
{
	int a[20001],i,n,haha,j;
	for(i=1;i<=10000;i++) a[i]=1;
	a[0]=0;
	a[1]=0;
	i=2;
	
	do
	{
		j=2;
		if(a[i]==1)
		do
		{
			n=i*j;
			a[n]=0;
			j++;
		}while(n<=10000);
		
		i++;
	}while(i<=10000);
	
	a[2]=0;
	scanf("%d",&haha);
	i=3;
	do
	{
		j=haha-i;
		if((a[i]==1)&&(a[j]==1)) printf("%d %d\n",i,j);
		i++;
	}while(i<=(haha/2));
	return 0;
}
int main()
	{int m,i,q,a;
	scanf("%d",&m);
	for(i=3;i<=m/2;i=i+2)
		{a=1;
		for(q=3;q<(m-i)/3;q=q+2)
			{if(i==i/q*q&&i/q!=1){a=0;break;}
			if((m-i)==(m-i)/q*q) {a=0;break;}}
		if (a) printf("%d %d\n",i,m-i);}
	return 0;
}
void main()
{
	int m,i,d,x,e;
	d=0;
	e=0;
    scanf("%d",&m);
	for (i=2;i<=m/2;i++)
	{ d=0;
	  e=0; 
		if (i%2==0);
		else
		{
			for (x=2;x<i;x++)
				if (i%x==0) d=1;
                        for (x=2;x<m-i;x++)
				if ((m-i)%x==0) e=1;
            if ((d==0) && (e==0)) printf("%d %d\n",i,m-i); 
        }    
    }
 }
int main()
{
	int m,i,j,k,a,b;
	cin>>m;
	for(i=3;i<=m/2;i+=2){
		a=1;b=1;
		for(j=2;j<i/2;j++){
			if(i%j==0)
				a=0;}
		for(k=2;k<(m-i)/2;k++){
			if((m-i)%k==0)
				b=0;}
		if(a*b!=0)
			cout<<i<<' '<<m-i<<endl;}
	return 0;
}
int main()
{
	int n,a=3,b=2,c,d=0,e=3,f,g=0;
	scanf("%d",&n);
	while (a<=n/2)
	{
		b=2;
		d=0;
		while(b<a)
		{
			c=a%b;
			if(c==0)
			{
				break;}
			else
			{
				d=d+1;
			}
			b=b+1;
		}
		if(d==a-2)
		{
			e=3;
			g=0;
			while(e<n-a)
			{
				f=(n-a)%e;
				if(f==0)
				{
					break;
				}
				else
				{
					g=g+1;
				}
				e=e+1;
			}
			if(g==n-a-3)
			{
				printf("%d %d\n",a,n-a);
			}
		}
		a=a+1;
	}
	return 0;
}
main()
{
int m=3,i,n,a,b;
scanf("%d",&n);
while(m<=n/2)
{for(i=2;i<=m-1;i++)
if(m%i==0)break;
if(i>=m)
{a=n-m;
for(i=2;i<=a-1;i++)
if(a%i==0)break;
if(i==a)
printf("%d %d\n",m,a);}
m=m+2;
}
}
int main()
{
    int a[25]={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};
    int b[10001]={0,0};
    int i,j,m;
    for(i=2;i<=10000;i++)
    {
                         b[i]=i;
    }
    for(i=0;i<=24;i++)
    {
                      for(j=2;j<=10000;j++)
                      {
                                           if(b[j]%a[i]==0&&b[j]!=a[i])
                                           {
                                                                       b[j]=0;
                                           } 
                      }
    }
    cin>>m;
    {
           for(i=2;2*i<=m;i++)
           {
                              if(b[i]!=0&&b[m-i]!=0)
                              {
                                                    cout<<i<<" "<<m-i<<endl;
                              }
           }
    }
    return 0;
}
int main()
{
	int find(int n);
	int m,k;
	cin>>m;
	for(k=3;k<=(m/2);k=k+2)
	{
		if(k==find(k)&&(m-k)==find(m-k)) 
			cout<<k<<" "<<m-k<<endl;
	}
	return 0;
}
int find(int n)
{
	int i,c=0;
	for(i=1;i<=n;i++)
	{
		if(n%i==0) c=c+1;
	}
	if(c==2) return (n);
	else return 0;
}
int zhishu(int x)
{
	int i,z=1;
	for(i=2;i<=x/2;i++)
		if(x%i==0)
		{
			z=0;
			break;
		}
	return(z);
}
void main()
{
         int m,i;
         scanf("%d",&m);
         for(i=2;i<=m/2;i++)
         if(zhishu(i)&&zhishu(m-i))
         printf("%d %d\n",i,m-i);
}
main()
{
  int m,i,j;
  scanf("%d",&m);
  for(i=3;i<=m/2;i++)
  {
     for(j=2;j<=i;j++)
     {
        if(i%j==0) break;
      }
     if(j==i)
     {
        for(j=2;j<=m-i;j++)
        {
           if((m-i)%j==0) break;
         }
        if(j==m-i) printf("%d %d\n",i,m-i);
      }
   }
}
int main()
{
	int a,i,j,n,m;
	scanf("%d",&a);
	for(i=3;i<a/2+1;i=i+2)
	{
		j=a-i;
			for(n=3;n<i;n=n+2)
			{
				if(i%n==0)
				{
					goto loop;
				}    
			}
			for(m=3;m<j;m=m+2)
			{
				if(j%m==0)
				{
					goto loop;
				}
			}
			printf("%d %d\n",i,j);
	loop: continue;
	}
	return 0;
}
int main(int argc, char* argv[])
{
	int m,i,j,b,su;
	scanf("%d",&m);
	for(i=3;i<=m/2;i+=2){
		su=1;
		for(j=2;j<i;j++){
			if(i%j==0) su=0;
		}
		if(su==1){
			b=m-i;
			for(j=2;j<b;j++){
				if(b%j==0) su=0;
			}
			if(su==1)printf("%d %d\n",i,b);
		}
	}
	return 0;
}
int main()
{
	int su(int x);
	int n,i;
	scanf("%d\n",&n);
	for(i=3;i<=n/2;i+=2)
	{
		if(su(i)&&su(n-i))
		{
			printf("%d %d\n",i,n-i);
		}
	}
}

int su(int x)
{
	int t,k,leap=1;
	if(x==3)
	  return 1;
	else 
	{
		for(t=3;t<=(x/2);t+=2)
		{
			k=x%t;
			if(k==0)
			{
				leap=0;
				break;
			}
		}
	}
	return(leap);
}
main()
{
      int m,a,b,k,s;
      
      scanf("%d",&m);
      for(a=3;a<=(m/2);a=a+2)
      {
        for(k=3;k<a;k=k+2)
        {if(a%k==0)
        {a=a+2;
        k=3;}}
        
        
        b=m-a;
        if(b>=a)
        {
        s=0;
        for(k=3;k<b;k=k+2)
        {if(b%k==0)
        s=s+1;}
  
        
        if(s==0)
        printf("%d %d\n",a,b);
        }
        
        }
      
      
      


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

int main ()
{
	int m;
	
	cin >> m;
	
	for(int i = 3; i <= m / 2; i += 2)
	{
		if(judge(i) == 1 && judge(m - i) == 1)
		cout << i << " " << m - i << endl;
	}
	
	return 0;
	
}
int main()
{
 	int m, x, y;
 	int a, b = 0;
 	int k, l;
 	
 	cin >> m;
 	
 	for (int i = 3; i <= m/2 ; i = i + 2)
 	{
	 	a = 0;
	 	
	 	for (k = 2; k*k <= i; k++)
	 	{
		 	if ( i % k == 0)
		 	   a = 1;
 	    }
	    
	    for (l = 2; l*l <= (m - i); l++)
	    {
		 	if (( m - i) % l == 0)
		 	   a = 1;
	
		 }	 
	 	 
	    if (a == 0)
	 	   cout << i << " " << m - i << endl;
 	    else
 	    	continue; 	  			

	 }
	 
	 return 0;

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

	return 0;
}
int isprime(int n)
{
	int i;
	for(i=2;i*i<=n;i++)
		if(n%i==0)
			return 0;
	return 1;
}

int main(int argc, char* argv[])
{
	int m,j;

	scanf("%d",&m);
	
	for(j=3;j*2<=m;j+=2)
		if(isprime(j)&&isprime(m-j))
			printf("%d %d\n",j,(m-j));

	return 0;
}
int panduan (int n);
int main()
{
	int m,i,t=0;
	cin>>m;
	for (i=3;i*2<=m;i++)
	{
		t=0;
		if (i%2!=0&&(m-i)%2!=0)
		{
			t=panduan(i)+panduan(m-i);
			if (t==2)
				cout<<i<<" "<<m-i<<endl;
		}
	}
	return 0;
}

int panduan (int n)
{
	int j;
	for (j=2;j*j<=n;j++)
	{
		if (n%j==0)
			break;
	}
	if (j*j>n)
		return 1;
	else
		return 0;
}
int main()
{
    int n,i,j,k,m;
    i = 2;
    cin>>n;
    for(;i<=n/2;i++)
    {
        j = n-i;
        if (i%2!=0 && j%2!=0)
        {
            m=0;
            for (k=2;k<=j-1;k++)
            {
                if (k != i)
                {
                    if (i%k==0 || j%k==0)
                       m++;
                }
            }
            if ( m == 0)
                cout<<i<<" "<<j<<endl;
        }
    }
    return 0;
}
int main()
{
	int m, i, j, a, b;
	cin >> m;
	a = 3;	
	b = m - 3;
	do
	{
		for ( i = 2; i < a; i ++ )
			if ( a % i == 0 )
				break;
		for ( j = 2; j < b; j ++)
			if ( b % j == 0)
				break;
		if(i==a && j==b)	cout<<a<<" "<<b<<endl;
    	a = a + 1;
		b = m - a;
	}while( a <= b );
	return 0;
}
int main ()
{
	int m, i1, i2, k, a, b = 0;
	cin >> m;
	for (i1 = 3; i1 <= (m / 2); i1 += 2)
	{
		a = sqrt(m);
		b = 0; 
		for (k = 2; k <= a; k++)   
		{
			if (k == i1)
				break;
			if (i1 % k == 0)
				b = b + 1;
		}
		if (b == 0)
		{
			i2 = m - i1;
			b = 0;
            for (k = 2; k <= a; k++)   
			{
				if (k == i2)
					break;
		 		if (i2 % k == 0)
					b = b + 1;
			}
		}
		if (b == 0)
			cout << i1 << " " << i2 << endl;
	}
	return 0;
}
int main()
{
	int check(int x);
	int a,b,num;
	scanf("%d",&num);
	for(a=2;a<=(num/2);a++)
	{
		b=num-a;
		if(check(b)&&check(a)) printf("%d %d\n",a,b);
	}
	return 0;
}
int check(int x){
	int i,k;
	k=sqrt(x);
	for(i=2;i<=k;i++)
	if(!(x%i)){
		x=0;break;}
	return x;
	}
int isprime(int n)
{
 int i;
for(i=2;i<n;i++)
if(n%i==0)
return 0;
return 1;
}

int main(void)
{
int m;
int i;
scanf("%d",&m);

for(i=3;i<=m/2;i+=2)
{
if(isprime(i)&&isprime(m-i))
{
printf("%d %d\n",i,m-i);
continue;
}
}
return 0;
}
int p(int n)
{
for(int i=2;i*i<=n;i++)
   if (n%i==0) return 0;
   return 1;
    }
int main()
{
    int a,p(int n);
    scanf("%d",&a);
    for (int i=3;2*i<=a;i++)
     if (p(i)*p(a-i)!=0) printf("%d %d\n",i,a-i);
    }
int is_prime(int n)  
{
	int k,limit;
	if(n == 2)
		return 1;
	
	if(n % 2 == 0)
		return 0;
	
	limit = n/2;                 
	for(k=3; k <= limit; k+=2)  
		if(n % k == 0)
			return 0;
		return 1;   
}
int main ()
{
	int number,a,b,i;
	cin >>number;
	for (a=3;a<=number/2;a++)
	{
		b=number-a;
		if (is_prime(a)==1&&is_prime(b)==1) cout <<a<<" "<<b<<endl;
	} 
	return 0;
}
int main()
{

    int a=2,b,m,s;
    scanf("%d",&m);
    s=m/2;
    while(a<=s)
    {
        b=m-a;
        int i=2,x,z,y=1,j=2,k,l,h=1;
        while(i<a)
        {
            x=a-a/i*i;
            if(x==0)
                z=0;
            else
                z=1;
            y=y*z;
            i++;
        }

        while(j<b)
        {
            k=b-(b/j)*j;
            if(k==0)
                l=0;
            else
                l=1;
            h=h*l;
            j++;
        }
        if(y==1)
            if(h==1)
            printf("%d %d\n",a,b);
        a++;
    }
return 0;
}
int main()
{
	int m,i,j,n,k;
	scanf("%d",&m);
	for(i=3;i<=m;i=i+2)
	{
		j=m-i;
		for(n=2,k=0;n<i;n++)
		{
			if(i%n==0)
				k++;
		}
		if(k==0)
			for(n=2,k=0;n<j;n++)
		{
			if(j%n==0)
				k++;
		}
		if(k==0&&i<=j)
			printf("%d %d\n",i,j);
	}
		return 0;
}
int main()
{
    int n,i,j,k;
    scanf("%d",&n);
    for(i=3;i<=n/2;i++)
    {
        for(j=2;j<i;j++)
            if(i%j==0) break;
        for(k=2;k<n-i;k++)
            if((n-i)%k==0) break;
        if(j==i && k==n-i)
           printf("%d %d\n",i,n-i);
    }
    getchar();
    getchar();
}
int p[11000], i, j, m;
int main() {
	for (i = 0, scanf("%d", &m); i <= m; i++)
		p[i] = 0;
	for (i = 2; i * i < m; i++) {
			for (j = i * 2;!p[i]&& j <= m; j += i)
				p[j]++;
	}
	for (i = 2; i <= m / 2; i++)
		if (p[i]+p[m - i] == 0)
			printf("%d %d\n", i, m - i);
	return 0;
}
void main()
{
     int i,j,m,n;
     int prime(int n);
     scanf("%d",&m);
     for(i=3;i<=m/2;i++) 
     {  if(prime(i)&&prime(m-i)) 
           printf("%d %d\n",i,m-i);}
     }
     
     int prime(int n)
     {
         int k,i;
         k=sqrt(n);
         for(i=2;i<=k;i++) if(n%i==0)break;
         return(i>k)?1:0;
         }
int main()
{
	int m,a,b,i,j,i_limit_a,j_limit_b,bool_a,bool_b;
	scanf("%d",&m);
	for (a=3;a<=(m/2);a=a+2)
	{
		i_limit_a=sqrt(a);
		bool_a=1;
		for (i=3;i<=i_limit_a;i=i+2)
			if (a%i==0) {bool_a=0;break;}
	    if (bool_a)
		{
			b=m-a;
			bool_b=1;
            j_limit_b=sqrt(b);
			for (j=3;j<=j_limit_b;j=j+2)
				if (b%j==0) {bool_b=0;break;}
            if (bool_b) printf("%d %d\n",a,b);
		}
	}
	return 0;
}
//*********************************************************************
//*????caixiang.cpp                                               *
//*?  ??spica                                                      *
//*?????2011?10?                                               *
//*????:???????????m,?????2??????           *
//*********************************************************************
int main()
{
	int even=0,odd1=0,odd2=0,sum1=0,sum2=0,j=0,k=0;//????even,?????odd1,odd2,??????sum1,sum2???????j,k
	cin>>even;
	for(odd1=3;odd1<=even/2;odd1++)
	{
		sum1=0;
		sum2=0;
		odd2=even-odd1;
		for(j=2;j<odd1;j++)
		{
			if(odd1%j==0)
				sum1=sum1+1;
		}
		for(k=2;k<odd2;k++)
		{
			if(odd2%k==0)
				sum2=sum2+1;
	}
	if(sum1==0&&sum2==0)
		cout<<odd1<<" "<<odd2<<endl;
}
return 0;
}