semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
  int odd[20001]={0};
  int num[10001]={0};
  int n,i,j,sum;
  cin>>n;
  for (i=2;i<=10000;i++)
    {
      if (odd[i]==0)
      {
        j=i;
        while (j<=10000)
          {
            j=j+i;
            odd[j]=1;    
          }                  
        }   
    }    
  sum=0;
  for (i=3;i<=10000;i++)
    if (odd[i]==0) 
      {
        sum=sum+1;
        num[sum]=i;           
      }
 
  for (i=1;i<=sum;i++)
    for (j=i;j<=sum;j++)
      if (num[i]+num[j]==n)
        cout<<num[i]<<" "<<num[j]<<endl;
 
  return 0;
}
int main()
{
	int i,n,flag1,flag2;
	int x(int i);
	scanf("%d",&n);
	for(i=3;i<=n/2;i++)
	{
		flag1=0;
		flag2=0;
		flag1=x(i);
		flag2=x(n-i);
		if(flag1==1&&flag2==1)
		{
			printf("%d %d\n",i,n-i);
		}



	}
	return 0;
}
int x(int i)
{
	int j;
	for(j=2;j<=i;j++)
	{
		if(i%j==0)
			break;
	}
	if(j==i)
		return 1;
	else
		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<=i/2;j+=2)
        if (i%j==0) flag=1;
        for (j=3;j<=(m-i)/2;j+=2)
        if ((m-i)%j==0) flag=1;
      }
      if (flag==0) printf("%d %d\n",i,m-i);
      flag=0;
 }
   return 0;
}
int i,n,s=0;
int zhishu(int a)
{
    s=0;
    if(a==1)
    return 0;
    else 
    {
    for(i=2;i<=a/2;i++)
    {if(a%i==0)
    s++;}
    if(s==0)
    return 1;
    else 
    return 0;
    }
}
main()
{
      int i,n;
      scanf("%d",&n);
      for(i=1;i<=n/2;i++)
      {
                         if(zhishu(i)==1 && zhishu(n-i)==1)
                         printf("%d %d\n",i,n-i);
                         }
      getchar();
      getchar();
      }
int main()
{
    int m, a, b;
    cin >> m;
    for (a = 3; a <= (m / 2); a = a + 2)
        {
             int count1 = 1;
             for (int n = 2; n <= sqrt(a); n++)
                 {
                     if (a % n == 0)
                          continue;
                      count1++;
                 }
             if (count1 > sqrt(a) - 1)
                 {
                     b = m - a;
                     int count2 = 1;
                     for (int i = 2; i <= sqrt(b); i++)
                         {
                              if (b % i == 0)
                                  continue;
                              count2++;
                         }
                         if (count2 > sqrt(b) - 1)
                             cout << a << " " << b << endl;
                 }
             
        }
        return 0;
}
//*************************
//*  ????????? 
//*  ????? 
//*  ???1200012941 
//*  ???2012?10?22? 
//*************************
int main()
{
    int i, j, x, n;
    cin >> n;
    for (x = 3; x <= n / 2; x = x + 2)
    {
        for (i = 2; i <=(int)sqrt(x) + 1; i++) 
        {
            if (x % i == 0)
                break;
            if (i == (int)sqrt(x) + 1)
            {
                for (j = 2; j <=(int)sqrt(n-x) + 1; j++) 
                {
                     if ((n-x) % j == 0)
                         break;
                     if (j == (int)sqrt(n-x) + 1) 
                         cout << x << " " << n - x << endl;
                }
            }
        }
    }
    return 0;
}
int sushu(int m)
{ int i;
  for(i=2;i<=m;i++)
  if(m%i==0)break;
  if(i<m)return 0;
  else return 1;
}
main()
{  int n,a,b,x,y;
   scanf("%d",&n);
   a=3;b=n-a;
   while(a<=b)
   { x=sushu(a);
     y=sushu(b);
     if(x==1&&y==1)
     {printf("%d %d\n",a,b);a=a+2;b=b-2;}
   else {a=a+2;b=b-2;}
   }
}
int main()
{
int n,i,j,k,f,g,d;
scanf("%d",&n);
for(i=2;i<=(n/2);i++)
{
  f=0;d=0;
  j=n-i;
  for(k=2;k<i;k++)
  {if(i%k==0) {f=0;break;}
  else f=1;}
  for(g=2;g<j;g++)
  {if(j%g==0) {d=0;break;}
  else d=1;}
  if(d==1&&f==1) printf("%d %d\n",i,j);
}

return 0;
}
//****************************
//*?????????   **
//*?????? 1200012896 **
//*???2012.10.21  **
//****************************
int main()
{
    int n, a, b, i, m;
    cin >> n; 
    for (a = 3; a <= n / 2; a++)
    {
        b = n - a;
        for (i = 2; i <= (int)sqrt (a); i++)
        {
            if (a % i == 0)
               break;
        }
        if (i == (int)sqrt (a) + 1)
        {
              for (m = 2; m <= (int)sqrt (b); m++)
                  {
                     if (b % m == 0)
                        break;
                  }
                  if (m == (int)sqrt (b) + 1)
                      cout << a << " " << b << endl;
        } 
    } 
    return 0;
}
main()
{
      int a,b,c,i,j,d,k;
      b=0;
     
      scanf("%d",&a);
      if(a==6)
      printf("3 3");
      else
      {d=a/2;
          for(i=3;i<=d;i++)
          {
                           for(b=0,j=2;j<i;j++)
                           {if(i%j==0) 
                           b=1;}
                           
                           if(b==0)
                           {c=a-i;
                                   for(k=2;k<c;k++)
                           if(c%k==0) 
                           b=1;
                           if(b==0)
                           printf("%d %d\n",i,(a-i));}
                             
                             }
                             }
                             getchar();
                             getchar();
                             }
int main()
{
int i,n,j,k;
int flag1=0;
int flag2=0;
cin>>n;
for(j=3;j<=n/2;j=j+2)
{
  k=n-j;
  for(i=2;i<j;i++)
  {
	if(j%i==0)
       {
		flag1=1;
        break;
		}
  }
  for(i=2;i<k;i++)
  {
	if(k%i==0)
       {
		flag2=1;
        break;
		}
  }
  if(flag1!=1&&flag2!=1)
    cout<<j<<" "<<k<<endl;
  flag1=0;
  flag2=0;
}
;
return 0;
}
main()
{
	int m;
	scanf("%d",&m);
	if (m==6)
	printf("3 3");
	else if (m==8)
	printf("3 5");
	else
	{
		int a=3;
		for (;a<=m/2;a=a+2)
	{
	if (sushu(a)==1&&sushu(m-a)==1)
	printf("%d %d\n",a,m-a);
	}
	}
}

int sushu(int num)
{
int b=2;
for(;b<sqrt(num)+1;b++)
{
if (num%b==0)
break;
}
if(b>=sqrt(num)+1)
return 1;
else return 0;
}
int main()
{
	int a;
	cin >> a;
	for (int i=3;i<=(a+1)/2;i++)
	{
		int p = 0;
		for(int k=2;k<=i-1;k++)
		{
			if (i%k==0)
				p=1;
		}
		for(int k=2;k<=a-i-1;k++)
		{
			if ((a-i)%k==0)
				p=1;
		}
		if (p==0)
			cout << i << " " << a-i <<endl;
	}

	return 0;
}
main()
{
      int n,a,b,c,d,x,y;
      int f(int a);
      scanf("%d",&n);
      c=n/2;
      for(b=3;b<=c;b++)
      {
            d=n-b;
            x=f(b);
            y=f(d);
            if(x==2&&y==2)
            printf("%d %d\n",b,d);
      }
}
int f(int a)
{
    int i,e=0;
    for(i=1;i<=a;i++)
    {
          if(a%i==0)
          e=e+1;
    }
    return(e);
}
//  ????????
//  main.cpp
//  Homework
//
//  Created by ??? on 13-10-18.
//  Copyright (c) 2013? ???. All rights reserved.
//


int sushu(int n)//???? ???1 ???0
{
	for(int i=2;i*i<=n;i++)
    {
    	if(n%i==0)
    	{
    		return 0;
    		break;
    	}
    }
    return 1;
}

int main()
{
    int m,a;
    cin>>m;
    for(a=3;a<=m/2;a=a+2)
        {
            if(sushu(a)&&sushu(m-a))//?????m ?????
                cout<<a<<" "<<m-a<<endl;
        }
    return 0;
}
int prime(int num)
{
	int i;
	if(num%2==0)
		return 0;
	else
	{
		for(i=3;i<num;i+=2)
	{
		if(num%i==0)
			break;
	}
	if(i==num)
		return 1;
	else
		return 0;
	}
}
int main()
{
	int num;
	int i;
	scanf("%d",&num);
	for(i=3;i<=num/2;i+=2)
	{
		if(prime(i)&&prime(num-i))
			printf("%d %d\n",i,num-i);
	}
	return 0;
}
int prime(int a)
{
	int k=2;
	while(k<=a/2)
	{
		if(a%k==0) {return 0;break;}
		else k++;
	}
	if(k>a/2) return 1;
}
int main ()
{
	int n,i;
	scanf("%d",&n);
	for(i=3;i<=n/2;i++)
		if(prime(i)==1&&prime(n-i)==1)
			printf("%d %d\n",i,n-i);
}
int main()
{
	int i,j,m,a,b,t,s,n=0;
	scanf("%d",&m);
	for(i=3;i<=m/2;i++)
	{
		n=n+1;
		t=0;
		s=0;
		a=i;
		b=m-i;
		for(j=2;j<a;j++)
		{
			if(a%j==0)
				t=t+1;
		}
		for(j=2;j<b;j++)
		{
			if(b%j==0)
				s=s+1;
		}
		if(s==0&&t==0)
		{
			if(n==1)
				printf("%d %d",a,b);
			else
				printf("\n%d %d",a,b);
		}
	}
	return 0;
}
int main()
{      int m;
    scanf("%d",&m);
    int p[A]={0};
    int i,j;

 p[0]=p[1]=1;
    for(i=2;i<=m;i++)
    {
        if(p[i]==0)
        {
            for(j=2;j<=m/i;j++)
                p[i*j]=1;
        }
    }/*??????*/

    int k;
    for(k=3;k<=m/2;k+=2)
    {
    if(p[k]+p[m-k]==0)
            printf("%d %d\n",k,m-k);
    }


    return 0;
}
int judge(int);

int  main()
{
	int num;
	cin>>num;
	for (int a=2;a<=num/2;a++)
	{
	    if (judge(a)&&judge(num-a))
	{
		cout<<a<<" "<<(num-a)<<endl;

	}	
	}


	return 0;
}


int judge(int n)
{
	double d,t;
	d=n;
	t=sqrt(d);
	int k=1;
	for(int i=2;i<=t;i++)
	{
		if (n%i==0)k=0;
	}
	return k;
}
int main()
{
	int a[10000];
	int m,i,n,sq,j,k=0,s,p,r;
	scanf("%d",&m);
	for(i=3;i<=m;i++)
	{
		s=0;
		sq=sqrt(i)+1;
		for(j=2;j<=sq;j++)
		{
			if(i%j==0)
			{
				s++;
				break;
			}
			else
				continue;
		}
		if(s==0)
		{
			a[k]=i;
			k++;
		}
		else
			continue;
	}
	for(i=0;i<k;i++)
	{
		r=0;
		if(a[i]<=m/2)
		{
		    p=m-a[i];
		    for(j=0;j<k;j++)
			{
			    if(p!=a[j])
				    continue;
			    else
				    printf("%d %d\n",a[i],p);
			}
		}
		else
			break;
	}
	return 0;
}
//**********************************************
//????????? 
//?????? 1300012917
//???2013.10.24
//**********************************************
int main()
{
	int a[10001] = {0}, p, m, i, j, sm;//??a?????????a[??]=0?a[??]=1 
	cin >> m;
	sm = sqrt(m); 
	//?2?m????????????? 
	for (i = 2; i <= sm; i++)
	  if (a[i] == 0) 
	    for (j = 2; i * j < m; j++)
	      a[i * j] = 1;
	      
	//?3?m/2??m???????????????????? 
	for (i = 3; i <= m / 2; i++)
	  if ((a[i] == 0) && (a[m-i] == 0)) 
	    cout << i << ' ' << m - i << endl;
	    
    return(0);
}
int szs(int a); 
int main()
{
    int i,j,n,m,s;
    s=0; 
    scanf("%d",&m);
    for(i=3;i<=m/2;i+=2)
    {
        if(szs(i)&&szs(m-i))
        {
            if(s!=0) printf("\n");
            printf("%d %d",i,m-i);
            s=1; 
        }
    }

    return 0;
}
int szs(int a)
{
    int i; 
    for(i=2;i<=a/2;i++)
    {
        if(a%i==0) break;
    }
    if(i>a/2) return 1;
    else return 0;
}
int main ()
{
    int i=3;
    int j=3;   //i+j=???m
    int l1=2;
    int l2=2;
    int m,n,k; //n???????????????,k?????????????
    char a='y'; //????????????????????????????
    cin>>m;
    n=m/2;
    for (i=3;i<=n;i++)              
    {
        a='y';
        j=m-i;
        k=sqrt(i);   
        for (l1=2;l1<=k;l1++)
        {
            if (i%l1==0)           
                a='n';   
        }                      //?????i?????
        k=sqrt(j);
        for (l2=2;l2<=k;l2++)
        {
            if (j%l2==0)
                a='n';
        }                      //?????j?????
        if (a=='y')
          cout<<i<<' '<<j<<endl;   
    }   
    return 0;           
}
int jud(int k)
{
	int s=sqrt(k);
	for(int i=2;i<=s;i++)
		if(k%i==0)
			return 0;
	return 1;


}
int main()
{
    int m, t, s;
	cin>>m;
	for(t=3;t<=m/2;t++)
    {
		s=m-t;
		if(jud(s)+jud(t)==2)
			cout<<t<<' '<<s<<endl;
	
	}
	return 0;

}
int main()
{
    int m = 0;
    scanf("%d", &m);
    int Set[5001];
    int SetN = 1;
    Set[0] = 0;
    Set[1] = 2;
    int i = 0, j = 0;
    for ( i = 2; i <= m; i++ )
    {
        for ( j = 1; j <= SetN; j++ )
        {
            if ( i % Set[j] == 0 )
                break;
        }
        if ( j == SetN + 1 )
        {
            SetN++;
            Set[SetN] = i;
        }
    }
        /*for ( j = 1; j <= SetN; j++ )
        {
            printf("%d\n", Set[j]);
        }*/
    for ( i = 1; i <= SetN; i++ )
    {
        if (Set[i]>m/2)
            break;
        for ( j = i; j <= SetN && Set[i]+Set[j] <= m; j++ )
        {
            if ( Set[i]+Set[j] == m )
            {
                printf("%d %d\n", Set[i], Set[j]);
            }
        }
    }
    return 0;
}
/*
 * 12.10.11a.cpp
 *  Created on: 2012-10-11
 *      Author: ???
 *      ???????????
 */
int p(int x)
{int i=2;
while(true)
	{
	if(i==(x-1)) {return(1);break;}
	else if (x%i==0){return(2);break;}
	i=i+1;
	}
}
int main()
{
	int n,m,a,k=3;
	cin>>n;
	m=n;
	while(n--)
	{a=m-k;if(k>(m/2))break;
	if(p(k)==1&&p(a)==1)cout<<k<<' '<<a<<endl;
	k=k+2;
	}
return 0;
}
int main()
{
	int a[10001], p, m, i, j, sm;
	cin >> m;
	for (i = 1; i <= m; i++) a[i] = 0;
	sm = sqrt(m);
	for (i = 2; i <= sm; i++)
	  if (a[i] == 0) 
	    for (j = 2; i * j < m; j++)
	      a[i * j] = 1;
	for (i = 3; i <= m / 2; i++)
	  if ((a[i] == 0) && (a[m-i] == 0)) 
	    cout << i << ' ' << m - i << endl;
    return(0);
}
int S(int x);
int main()
{
  int m,i,x,y;
  scanf("%d",&m);
  for(i=3;i<=m/2;i++)
     if(S(i)==0&&S(m-i)==0)
  printf("%d %d\n",i,m-i);
  return 0;
}
   int S(int x)
  {int i,k,r=0;
     k=sqrt(x);
    for(i=2;i<=k;i++)
      if(x%i==0){
            r=1;break;}
      return r;
   }
int main(void)
{
	int n;
	scanf("%d",&n);
	
	for(int i = 3;i < n;i++)
	{
	for(int k = 2;k < i;k++)
	{
		if(i % k == 0) goto There; 
	}
	for(int k = 2;k < n-i;k++)
	{
		if((n-i)%k == 0) goto There;
	}
	if(i <= n-i) printf("%d %d\n",i,n-i);
	There:;
	} 
	return 0;
}
main()
{
	int x,i,j,k,l;
	scanf("%d",&x);
	for (i=3;i<=x/2;i+=2)
	{
		l=0;
		j=x-i;
		for(k=2;k<=i-1;k++)
		{
			l=l+!(i%k);
		}
		for (k=2;k<j;k++)
		{
			l+=!(j%k);
		}
		if (!l) printf("%d %d\n",i,j);
	}




}
int main ()
{
	int m;
	int i, j, p;
	int n1, n2;
	scanf("%d", &m);
	for (n1=3; n1<=m/2; n1+=2) {
		for (j=3, p=0; j<n1/2; j+=2) {
			if (n1%j==0) {
				p=1;
				break;
			}
		}
		if (p==0) {
			n2=m-n1;
			for (j=3; j<n2/2; j+=2) {
			if (n2%j==0) {
				p=1;
				break;
				}
			}
			if (p==0) {
				printf("%d %d\n", n1, n2);
			}
		}
	}
	return 0;
}
int sushu(int n);
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 sushu(int n)
{
	int i,k;
	k=sqrt(n);
	for(i=3;i<=k;i=i+2)
	if(n%i==0)
	return 0;
	return 1;
}
int istarget(int);

int main(void)
{
    int num,i;
    scanf("%d",&num);
    for (i=2;i<=num/2;i++)
    {
        if (istarget(i)==1 && istarget(num-i)==1)
            printf("%d %d\n",i,num-i);
    }

    return 0;
}

int istarget(int num)
{
    int i;
    for (i=2;i<=num/2;i++)
    {
        if (num%i==0)
            return 0;
    }
    return 1;
}
int main()
{
	int m,a,b,A,B,i;
	scanf("%d",&m);
	a=3;
	
	for(a=3;a<=m/2;a=a+2)
	{
		b=a;
		for(b=a;b<=m;b=b+2)
		{
			if(a+b==m)
			{
				A=1;
				B=1;
				i=2;
				for(i=2;i<a;i++)
				{
					if(a%i==0)
						A=-1;
				}
				i=2;
				for(i=2;i<b;i++)
				{
					if(b%i==0)
						B=-1;
				}
				if(A==1&&B==1)
					printf("%d %d\n",a,b);
			}
		}
	}
	return 0;
}
int main()
{
	int n,i,j,m=0,good,count=0;
	int b[100];
	scanf("%d",&n);
	for(i=3;i<n;i++)
	{
		good=0;
		for(j=2;j<i;j++)
		{
			if(i%j==0)
			{
				good=1;
			}
		}
		if(good==0)
		{
			b[m]=i;
			m++;
			count++;
		}
	}
	for(i=0;i<count;i++)
	{
		for(j=0;j<count;j++)
		{
			if(b[i]+b[j]==n&&b[i]<=b[j])
			{
				printf("%d %d\n",b[i],b[j]);
			}
		}
	}
	return 0;
}
int issushu(int n);
int a[1000],b[1000];
int main()
{
	int n,j,q,i,count=0;
	scanf("%d",&n);
	for(i=2;i<=(n/2);i++)
	{
		j=issushu(i);
		q=issushu(n-i);
		if((j==1)&&(q==1))
		{
			a[count]=i;
			b[count]=n-i;
			count++;
		}
	}
	if(count!=0){
	for(i=0;i<count;i++)
	{
		printf("%d %d\n",a[i],b[i]);
	}}
	return 0;
}
int issushu(int n)
{
	int i,flag=1;
	for(i=2;i<n;i++)
	{
		if(n%i==0)
		{
			flag=0;
		}
	}
	return flag;
}
int shusu(int n)
{  int k;
   k=(int)sqrt(n);
   int i,t;
   if(n==3)
   return 0;
   else
  { for(i=3,t=0;i<=k;i=i+2)
   if(n%i==0)
   t=t+1;
   return t; 
}
}
main()
{     int n;
      scanf("%d",&n);
      int i;
      for(i=3;i<=n/2;i=i+2)
     {if(shusu(i)==0&&shusu(n-i)==0)
      printf("%d %d\n",i,n-i);                 
                       }
      
}
int PrimeNumber(int p){
    int i; 
    for(i=2;i<=sqrt(p);i++)
    if(p%i==0) 
    return 0;
    return 1;
    }
int main()
{
    int m,j;
    cin>>m;
    for(j=3;j<=m/2;j=j+2)
    {
     if(PrimeNumber(j)&&PrimeNumber(m-j)) cout<<j<<' '<<m-j<<endl;
    
    }

    return 0;
    }
int main()
{
 int m,a,b,i,j,mult;
 scanf("%d",&m);
 a=2;
 while(a<=(m+1)/2)
 {
	 mult=1,i=2;
		 while(i<a)
		 {
			 mult=mult&&(a%i);
			 i++;
		 }
		 if(mult!=0)
		 {
			 b=m-a,mult=1,i=2;
			 while(i<b)
			 {
				 mult=mult&&(b%i);
				 i++;
			 }
			 if(mult!=0)
			 {
				 printf("%d %d\n",a,b);
			 }
		 }
	a++;
 }
}
//********************************
//*?????????   
//*?????? 1300012887 **
//*???2013.10.18 **
//********************************
int main()
{
	int m, i, a, j, b, k;    //??????
	cin >> m;
		for (i = 3; i <= m/2; i += 2)    //?????3??????i?m-i?????
		{
			int a = sqrt(i);
			for (j = 2; j <= a; j++)    //??????i?????
			{
				if (i % j == 0) 
					break;
			}
			int b = sqrt(m - i);
			for (k = 2; k <= b; k++)    //??????m-i???
			{
				if ((m - i) % k == 0) 
					break;
            }
			if ((j == a + 1) && (k == b + 1))    //?????????????
				cout << i << " " << m - i << endl;
		}

	    return 0;
}
int main()
{
int m,i,j,k,odd1,odd2,sum1,sum2;//m:?????;i,j,k:????;odd1,odd2:??????????odd1<odd2;sum1,sum2:??????????????????
cin>>m;
for(i=3;i<=m/2;i+=2)
{
	sum1=0;
	sum2=0;
	odd1=i;
	odd2=m-odd1;
	for(j=2;j<odd1;j++)
		if(odd1%j==0)
			sum1+=1;
	for(k=2;k<odd2;k++)
		if(odd2%k==0)
			sum2+=1;
	if(sum1==0&&sum2==0)
		cout<<odd1<<' '<<odd2<<endl;

}
return 0;
}
//***********************************************
//         1.cpp
//   ??????
//  created on 2012-10-22
//  author ?? 1200012934
//***********************************************
int main()
{
	int m, i, j, l;
	cin >> m;
	for (i = 3; i <= m /2; i++)
	{
		l = (int) sqrt (i);
		for (j = 2; j <= l; j++)
			if (i % j == 0) break;
		if (j == l + 1)
		{
			l = (int) sqrt (m - i);
			for (j = 2; j <= l; j++)
				if ((m - i) % j == 0) break;
			if (j == l +1)
				cout << i << " " << m - i << endl;
		}
	}
	return 0;
}
int main()
{
	int m, x, y, i, k, t; 
	k = t = 0;
	cin >> m;
	for (x = 3; x <= (m / 2); x += 2)
	{
		for (i = 3; i * i <= x; i += 2)
		{
			if ((x % i) == 0)
			{
				k = 1;
				break;
			}
		}
		
		if (k == 0)
		{
			y = m - x;
			for (i = 3; i * i <= y; i += 2)
			{
				if ((y % i) == 0)
				{
					t = 1;
					break;  
				}
			}
			if (t == 0)
				cout << x << ' ' << y << endl;
			else
				t = 0;
		}
		else
			k = 0;
	}
	return 0;
}
int main()
{
	int flag[SIZE]={0};
	int i,j,r,num;	
	for(i=3;i<32767;i++)
	{
		if(i%2==1)
		{
			for(j=2;j<=sqrt(i);j++)
			{
				r=i%j;
				if(r==0)
				{
					break;
				}
			}
			if(r!=0)
			{
				flag[i]=1;
			}
		}
	}
	scanf("%d",&num);
	for(i=3;i<=num/2;i++)
	{
		if(flag[i]==1&&flag[num-i]==1)
		{
			printf("%d %d\n",i,num-i);
		}
		i++;
	}
	return 0;
}
int main()
{
	int m, n, c;
	cin >> m;
	for (int i = 3; i <= m / 2; i++)
	{
		c = 1;
                  for (int j = 2; j <= i; j++)
		{
			if (i % j == 0 && j != i)
			{   
				c = 0;
				break;
			}
			if (j == i)
			    break;
		}
		if (c)
		{
			n = m - i;
      
			for (int k = 2; k <= n; k++)
			{
			    if (n % k == 0 && n != k)
	                break;
	            if (n == k)
				{
				    cout << i << " " << n << "\n";
				}
			}
        }
	}
	return 0;
}
int main()
{
	int m,i,j,k,t,f1,f2;
	double s[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};
	double a,b;
	cin>>m;
	a=3;
	b=0;
	
	while (a<=(m/2))
	{
		b=m-a;
		i=0;
		t=0;
		k=0;
		j=0;
	
		while(i<25&&s[i]<a)
		{
			f1=fmod(a,s[i]);			
			if (f1!=0)
			{
				i=i+1;
				t=t+1;
			}
			else i=i+26;
		}
				
		while(j<25&&s[j]<b)
		{
			f2=fmod(b,s[j]);
			if (f2!=0)
				{
					j=j+1;
					k=k+1;
				}
			else j=j+26;
		}
		if (k==j&&i==t) cout<<a<<" "<<b<<endl;
		a=a+2;
	}
		return 0;
}
int main()
{
    int sushu(int);//shusu?????????????
    int num=0;//num???????
    cin>>num;
    for(int i=3;i<=num/2;i=i+2)
    {
        if(sushu(i)&&sushu(num-i))//???????1????????????if???
        cout<<i<<' '<<num-i<<endl;
    }
    return 0;
}
int sushu(int n1)//??n1?????
{
    if(n1==2||n1==3)return 1;
    for(int j=2;j<=sqrt(n1);j++)
    {
        if(n1%j==0)return 0;//n1????????????0
    }
    return 1;//n1???j??????????????1
}
//********************************
//*????????? **
//*?????1300062805 **
//*???2013.10.27 **
//********************************
int main()
{
	int m, a, b, c, d, e, i, n, p; 
    cin >> m;
	for ( i = 3; i <= m / 2; i +=2 )   // ??????
	{
		n = (int)sqrt(i);
	    a = 2;
		while ( a <= n)
		{
			p = i % a;
			if ( p == 0 )break;// ???????
			a++;
			
		}
		if ( a == n + 1)  // ????????
		{
			c =  m - i;
			d = (int)sqrt (c);
		    for ( a = 2; a <= d; a ++)  // ??????
			{
			
		    e = c % a;
			if ( e == 0)break;
			}
			if ( a == d + 1)
			{
				cout << i << " " << c << endl;
			} 
		}
	}
return 0;
}
int main()
{
    int m,a,b,j,i;
    scanf("%d",&m);
    for(a=3;a<m;a=a+2)
      for(b=3;b<m;b=b+2)
        {
            if(a+b==m&&a<=b)
          {
            for(i=2;i*i<=a;i++)
             if(a%i==0) break;
            for(j=2;j*j<=b;j++)
             if(b%j==0) break;
            if(i*i>a&&j*j>b) printf("%d %d\n",a,b);
          }
        }
}
int main()
{
	int m,i,k,j,n;
	scanf("%d",&m);
	for(i=3;i<=(m/2);i++)
	{
		k=1;
		for(j=2;j<=(i/2);j++)
		{
			if(i%j==0)
			{
				k=0;
			}
		}
		if(k==1)
			n=m-i;
		for(j=2;j<=(n/2);j++)
		{
			if(n%j==0)
			{
				k=0;
			}
		}
		if(k==1)
		printf("%d %d\n",i,n);
	}
	return 0;
}
int main()
{
    int k , m ,i ,a ,j,s,u;
    cin>>m;
    for(k=3;k<=m/2;k++)
    {
                     s=u=0;
                     for(i=2;i<=sqrt(k);i++)
                     {
                                        if(k%i==0)
                                        s=s+1;
                                        }
                                        if(s==0)
                                        {
                                                a=m-k;
                                                for(j=2;j<=sqrt(a);j++)
                                                {
                                                         if(a%j==0)
                                                         u=u+1;  
                                                         }
                                                         if(u==0)
                                                         cout<<k<<' '<<a<<endl;                                  
                                                         }
                                                         }
                                                    
                                                         return 0;
                                                         }
int main()
{int m,a,i,k;
scanf("%d",&m);
for(a=3;a<=m/2;a+=2)
{k=0;{for(i=1;i<=m/2;i+=2)
if(a%i==0||(m-a)%i==0) k++;}
if(k==2) printf("%d %d\n",a,m-a);}
return 0;}
int main()
{
	int m,i,j,w,x,k,s;
	cin>>m;
	for(i=3;i<=m/2;i+=2)
	{
		j=m-i;
		w=sqrt(i);
		x=sqrt(j);
		for(k=2;k<=i-1;k++)
		{
			if(i%k==0) break;
			if(k>=i-1) 
			{
				for(s=2;s<=j-1;s++)
				{
					if(j%s==0) break;
					if(s>=j-1) cout<<i<<' '<<j<<endl;
				}
			}
		}
	}
	return 0;
}
int main()
{
	int a[100000],i,j,k,n;
	cin >> n;
	a[1]=2;
	k=2;
	for(i=3;i<=n;i+=2)
	{
		for(j=1;;j++)
		{
			if(a[j]*a[j]>i)
				break;
			else
			{
				if(i%a[j]==0)
					break;
			}
		}
		if(a[j]*a[j]>i)
		{
			a[k]=i;
			k++;
		}
	}
	for(i=1;i<k;i++)
	{
		for(j=i;j<k;j++)
		{
			if(a[i]+a[j]==n)
			{
				cout << a[i] << ' ' << a[j] << endl;
			}
		}
	}
	return 0;
}
int yes(int n)
{
    int m,i;
    m=(int)sqrt(n);
    for(i=3;i<=m;i+=2)
    {
       if(n%i==0)
       return 0;
    }
    return 1;
}
main()
{
      int m,n,i;
      scanf("%d",&n);
      for(i=3;i<=n/2;i+=2)
      {
                      if(yes(i)&&yes(n-i))
                      {
                               
                                printf("%d %d\n",i,n-i);
                      }
      }
      getchar();
      getchar();
}
int sushu(int x)
{
	int i,j;
	if(x==3)
	return 1;
	for(i=2;i<=sqrt(x);i++)
	{
		if(x%i==0)
		{
			return 0;
		}
	}
	return 1;
}
int main()
{
	int m,i,j;
	scanf("%d",&m);
	for(i=3;i<=m/2;i=i+2)
	{
		if(sushu(i))
		{
			j=m-i;
			if(sushu(j))
			{
				printf("%d %d\n",i,j);
			}
		}
	} 
	return 0;
}