semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
//***************************************************************************************************************************
/* @file   2ndfor1
 * @author ??
 * @date   2012-9-26
 * @desc   ???????????? - 
 */
int main()															//?????
{
	int a, b, c, z;													//????
	cin >> z;
	a = z % 3 == 0;													//??z?3?5?7???????????a?b?c=1
	b = z % 5 == 0;
	c = z % 7 == 0;
	if (a && b && c) cout << "3 5 7" << endl;						//?????????????3 5 7
	else if (a && b) cout << "3 5" << endl;							//????????????????????????
	else if (a && c) cout << "3 7" <<endl;
	else if (b && c) cout << "5 7" <<endl;
	else if (a) cout << "3" <<endl;									//??????????????????
	else if (b) cout << "5" <<endl;
	else if (c) cout << "7" <<endl;
	else cout << "n" << endl;										//????????no
	return 0;
}
int main()
{
	int n;//n??????????
	cin>>n;
	if(n%3==0)
	{
		cout<<"3";
		if(n%5==0)
			cout<<" 5";
		if(n%7==0)
			cout<<" 7";
	}
	else
	{
		if(n%5==0)
		{
			cout<<"5";
			if(n%7==0)
				cout<<" 7";
		}
		else
		{
			if(n%7==0)
				cout<<"7";
			else
			    cout<<"n";
		}
	}
	return 0;
	//*************************************************************************************************************
	//??if????????????????3,5,7??????????????????????????????????
	//???????????????????????????
}
void main()
{
	int a,b[3]={3,5,7},i;
	scanf("%d",&a);
	for(i=0;i<3;i++)
	{
		if(a%b[i]==0)
		{	printf("%d",b[i]);
		    if(a%b[i+1]==0&&i+1<3)
				putchar(' ');
			else if(a%b[i+2]==0&&i+2<3)
				putchar(' ');
		}
		else if(a%b[i]!=0&&a%b[i+1]!=0&&a%b[i+2]!=0)
			printf("n");
		
	}
}
int main(){
	int a,i;
	scanf("%d",&a);
	i=0;
    if ((a%3==0)&&(a%5==0)&&(a%7==0)) {printf("3 5 7\n");i=1;}
	else if (a%3==0&&a%5==0) {printf("3 5\n");i=1;}
	else if (a%3==0&&a%7==0) {printf("3 7\n");i=1;}
	else if (a%5==0&&a%7==0) {printf("5 7\n");i=1;}
	else if (a%3==0) {printf("3\n");i=1;}
	else if (a%5==0) {printf("5\n");i=1;}
	else if (a%7==0) {printf("7\n");i=1;}
	if (i==0) printf("n\n");
    return 0;
}
int main()
{
	int iNumber,i,iCount_can=0,iCount_blank_space=0;//iNumber???????iCount_can????????????????iCount_blank_space????????????
	cin>>iNumber;
	for(i=3;i<8;i++,i++)
	{
		if(iNumber%i==0)                            //???????i??
		{
			if(iCount_blank_space)
				cout<<' ';
			cout<<i;
			iCount_can++;
			iCount_blank_space=1;                   //????????i?????iCount_blank_space=1??????????????????
		}
	}
	if(iCount_can==0)
		cout<<'n'<<endl;
    return 0;
}
void main()
{
	int m,a,b,c;
	scanf("%d",&m);
	a=m%3;b=m%5;c=m%7;
	if (m%3==0&&m%5==0&&m%7==0)
    printf("3 5 7");
	else if(m%3!=0&&m%5==0&&m%7==0)
	printf("5 7");
	else if(m%3==0&&m%5!=0&&m%7==0)
	printf("3 7");
	else if(m%3==0&&m%5==0&&m%7!=0)
	printf("3 5");
	else if(m%3!=0&&m%5!=0&&m%7==0)
	printf("7");
	else if(m%3==0&&m%5!=0&&m%7!=0)
	printf("3");
	else if(m%3!=0&&m%5==0&&m%7!=0)
	printf("5");
	if(m%3!=0&&m%5!=0&&m%7!=0)
	printf("n");
}
//********************************
//*?????3,5,7????   **
//*????? 1300012845 **
//*???2013.9.27  **
//********************************
int main()//???
{
	int n,x;
	x=0;
	cin>> n;
	if (n%3==0)//?????3??
		x=x+3;
	if (n%5==0)//?????5??
		x=x+5;
	if (n%7==0)//?????7??
		x=x+7;
	if (x==0) cout << "n" << endl;//??x???????
	if (x==3) cout << "3" << endl;
	if (x==5) cout << "5" << endl;
	if (x==7) cout << "7" << endl;
	if (x==8) cout << "3 5" << endl;
	if (x==10) cout << "3 7" << endl;
	if (x==12) cout << "5 7" << endl;
	if (x==15) cout << "3 5 7" << endl;
	return 0;
}
int main()
{
	int a;
	int result[4]={0};
	char c='n';

	scanf("%d",&a);

	if(a%3==0)
	{
		result[1]=3;
	}
	else
	{
		result[1]=0;
	}

	if(a%5==0)
	{
		result[2]=5;
	}
	else
	{
		result[2]=0;
	}

	if(a%7==0)
	{
		result[3]=7;
	}
	else
	{
		result[3]=0;
	}


	if (result[1]!=0 && result[2]==0 && result[3]==0)
	{
		printf("%d",result[1]);
	}

	if (result[1]==0 && result[2]!=0 && result[3]==0)
	{
		printf("%d",result[2]);
	}

	if (result[1]==0 && result[2]==0 && result[3]!=0)
	{
		printf("%d",result[3]);
	}

	if (result[1]!=0 && result[2]!=0 && result[3]==0)
	{
		printf("%d %d",result[1],result[2]);
	}

	if (result[1]!=0 && result[2]==0 && result[3]!=0)
	{
		printf("%d %d",result[1],result[3]);
	}

	if (result[1]==0 && result[2]!=0 && result[3]!=0)
	{
		printf("%d %d",result[2],result[3]);
	}

	if (result[1]!=0 && result[2]!=0 && result[3]!=0)
	{
		printf("%d %d %d",result[1],result[2],result[3]);
	}



	if (result[1]==0 && result[2]==0 && result[3]==0)
	{
		printf("%c",c);
	}

	return 0;
}
int main()
{
	int m;
	scanf("%d",&m);
	int a=(m%3==0),b=(m%5==0),c=(m%7==0);
	if(a==1&&b==1&&c==1) printf("3 5 7");
	else if(a==1&&b==1&&c!=1) printf("3 5");
	else if(a==1&&b!=1&&c==1) printf("3 7");
	else if(a!=1&&b==1&&c==1) printf("5 7");
	else if(a==1&&b!=1&&c!=1) printf("3");
	else if(a!=1&&b==1&&c!=1) printf("5");
	else if(a!=1&&b!=1&&c==1) printf("7");
	else printf("n");
	return 0;
}
int main()
{
    int a,sum;
    sum=0;
    scanf("%d",&a);
    if (a%3==0)
    sum=sum+3;
    if (a%5==0)
    sum=sum+5;
    if (a%7==0)
    sum=sum+7;
    if (sum==0)
    printf("n");
    if (sum==3)
    printf("3");
    if (sum==5)
    printf("5");
    if (sum==7)
    printf("7");
    if (sum==8)
    printf("3 5");
    if (sum==10)
    printf("3 7");
    if (sum==12)
    printf("5 7");
    if (sum==15)
    printf("3 5 7");
    return 0;
}
void main()
{
	int a,m,p,j;
	char t='n';
	m=3;p=5;j=7;
	scanf("%d",&a);
	if(a%3==0 && a%5==0 && a%7==0) printf("%d %d %d",m,p,j);
	else if(a%3!=0 && a%5!=0 && a%7!=0)  printf("%c",t);
	else if(a%3==0 && a%5==0 && a%7!=0) printf("%d %d",m,p);
	else if(a%3==0 && a%5!=0 && a%7==0) printf("%d %d",m,j);
	else if(a%3!=0 && a%5==0 && a%7==0) printf("%d %d",p,j);
	else if(a%3==0) printf("%d",m);
	else if(a%5==0) printf("%d",p);
	else if(a%7==0) printf("%d",j);printf("\n");
}
int main ( )
{int n,m=0,a[3];
cin>>n;
if (n%3==0) a[m++]=3;
if (n%5==0) a[m++]=5;
if (n%7==0) a[m++]=7;
if (m==0) cout<<"n";
else
{
int i;
for (i=0;i<m-1;i++) cout<<a[i]<<' ';
cout<<a[m-1];
}
return 0;
}
int main(){
	int a;
   scanf("%d",&a);
   if(a%105==0) printf("3 5 7");
   if(a%15==0&&a%7!=0) printf("%d %d\n",3,5);
   if(a%21==0&&a%5!=0) printf("3 7");
   if(a%35==0&&a%3!=0) printf("5 7");
   if(a%3==0&&a%5!=0&&a%7!=0) printf("3");
   if(a%5==0&&a%3!=0&&a%7!=0) printf("5");
   if(a%7==0&&a%5!=0&&a%3!=0) printf("7");
   if(a%3!=0&&a%5!=0&&a%7!=0) printf("n");
   return 0;
}
main()
{
      int n,N;
      scanf("%d",&n);
      N=n;
      
      if(n%3==0)
        n=n/3;
      if(n%5==0)
        n=n/5;
      if(n%7==0)
        n=n/7;
      
      if(N/n==1)
        printf("n");
      if(N/n==3)
        printf("3");
      if(N/n==5)
        printf("5");
      if(N/n==7)
        printf("7");
      if(N/n==15)
        printf("3 5");
      if(N/n==21)
        printf("3 7");
      if(N/n==35)
        printf("5 7");
      if(N/n==105)
        printf("3 5 7");
}
void main()
{
int a;

scanf("%d",&a);

if(!(a%3)&&!(a%5)&&!(a%7)) printf("3 5 7\n");

else if (!(a%3)&&!(a%5)) printf("3 5\n");

else if(!(a%3)&&!(a%7)) printf("3 7\n");

else if(!(a%5)&&!(a%7)) printf("5 7\n");

else if(!(a%3)&&!(a%7)) printf("3 7\n");

else if(!(a%3)) printf("3\n");

else if(!(a%5)) printf("5\n");

else if(!(a%7)) printf("7\n");

else printf("n\n");
}
int main()
{
	int a;     
	cin >>a;    
	if(a%3==0&&a%5>0&&a%7>0)
	{
		cout <<3;
	}
	if(a%5==0&&a%3>0&&a%7>0)
	{
		cout <<5;
	}
	if(a%7==0&&a%5>0&&a%3>0)
	{
		cout <<7;
	}
	if(a%3==0&&a%5==0&&a%7>0)
	{
		cout <<3<<" "<<5;
	}
	if(a%3==0&&a%5>0&&a%7==0)
	{
		cout <<3<<" "<<7;
	}
	if(a%3>0&&a%5==0&&a%7==0)
	{
		cout <<5<<" "<<7;
	}
	if(a%3==0&&a%5==0&&a%7==0)
	{
		cout <<3<<" "<<5<<" "<<7;
	}
	if(a%3>0&&a%5>0&&a%7>0)
	{
		cout <<"n";
	}
	return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	if(n%3==0&&n%5==0&&n%7==0)
		printf("%d %d %d",3,5,7);
    if(n%3==0&&n%5==0&&n%7!=0)
		printf("3 5");
	if(n%5==0&&n%7==0&&n%3!=0)
		printf("5 7");
	if(n%3==0&&n%7==0&&n%5!=0)
		printf("3 7");
	if(n%3==0&&n%5!=0&&n%7!=0)
		printf("3");
	if(n%3!=0&&n%5==0&&n%7!=0)
		printf("5");
	if(n%3!=0&&n%5!=0&&n%7==0)
		printf("7");
	if(n%3!=0&&n%5!=0&&n%7!=0)
		printf("n");
	return 0;

}
int main()
{
    int n;              //????n
    cin>>n;             //????n
    if(n%3==0)         //??????3??
    {
        cout<<"3";     //??3 
        if(n%5==0)          //??????5??
       {
           cout<<" "<<"5";     //??5
           if (n%7==0)
           cout<<" "<<"7";     //??7
       }  
       else if(n%7==0)
       cout<<" "<<"7";        //??7 
    }
    if(n%3!=0)
  {
        if(n%5==0)          //??????5??
       {
           cout<<"5";     //??5
           if (n%7==0)
           cout<<" "<<"7";
       }  
       else if(n%7==0)
       cout<<"7";          //??7
    }
    if(n%3!=0&&n%5!=0&&n%7!=0)  //?????????
    cout<<"n";          //??n
    return 0;
}
int main()
{
	int n;
	while(cin>>n)
	{
		if(n%105==0)
			cout<<"3 5 7"<<endl;
		else if(n%15==0||n%21==0||n%35==0)
		{
			if(n%15==0)
				cout<<"3 5"<<endl;
			else if(n%21==0)
				cout<<"3 7"<<endl;
			else cout<<"5 7"<<endl;
		}
		else if(n%3==0||n%5==0||n%7==0)
		{
			if(n%3==0)
				cout<<"3"<<endl;
			else if(n%5==0)
				cout<<"5"<<endl;
			else cout<<"7"<<endl;
		}
		else cout<<'n'<<endl;
	}
	return 0;
}
int main(){
  int a;
  int b,c,d;
  scanf("%d",&a);
      b=3;
      c=5;
      d=7;
  if(a%3==0&&a%5==0&&a%7==0){
      printf("%d %d %d\n",b,c,d);
 }else if(a%3==0&&a%5==0){
  printf("%d %d\n",b,c);
}else if(a%3==0&&a%7==0){
printf("%d %d\n",b,d);
}else if(a%5==0&&a%7==0){
printf("%d %d\n",c,d);
}else if(a%3==0){
printf("%d\n",b);
}else if(a%5==0){
printf("%d\n",c);
}else if(a%7==0){
printf("%d\n",d);
}else{
printf("n");
}
return 0;
}
/* * * * * * * * * * * * * * * * * * * * * * * * *
 *              homework.cpp                     *
 *           ???  1200012964                  *
 *               2012-9-28                       *
 *         ????:??3?5?7????          *
 * * * * * * * * * * * * * * * * * * * * * * * * */
int main()//???
{
	int m;//????m
	cin>>m;//??m
	if(m % 3 == 0 && m % 5 ==0 && m % 7 == 0)//???3,5,7??
		cout<<"3"<<" 5 "<<"7"<<endl;
	else if (m % 3 == 0 && m % 5 ==0 && m % 7 != 0)//???3,5??
		cout<<"3"<<" 5"<<endl;
	else if(m % 3 == 0 && m % 5 != 0 && m % 7 == 0)//???3,7??
		cout<<"3"<<" 7"<<endl;
	else if(m % 3 != 0 && m % 5 == 0 && m % 7 == 0)//???5,7??
		cout<<"5"<<" 7"<<endl;
	else if(m % 3 == 0 && m % 5 != 0 && m % 7 != 0)//??3??
		cout<<"3"<<endl;
	else if(m % 3 != 0 && m % 5 == 0 && m % 7 != 0)//??5??
		cout<<"5"<<endl;
	else if(m % 3 != 0 && m % 5 != 0 && m % 7 == 0)//??7??
		cout<<"7"<<endl;
	else if(m % 3 != 0 && m % 5 != 0 && m % 7 != 0)//???3,5,7??
		cout<<"n"<<endl;
	return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	if(n%105==0){printf("3 5 7");}
	else if(n%35==0){printf("5 7");}
	else if(n%21==0){printf("3 7");}
	else if(n%15==0){printf("3 5");}
	else if(n%7==0){printf("7");}
	else if(n%5==0){printf("5");}
	else if(n%3==0){printf("3");}
	else if(n%3!=0&&n%5!=0&&n%7!=0) printf("n\n");

}
int main()
{
	int n;
	int num[3] = {0, 0, 0,};
	int count;
	
	cin >> n;
	
	if(n % 3 == 0)
	num[0] = 1;
	
	if(n % 5 == 0)
	num[1] = 1;
	
	if(n % 7 == 0)
	num[2] = 1;
	
	count = num[0] + num[1] + num[2];
	
	if( num[0] == 1)
	{
	if( count != 1)
	cout << 3 << " ";
	else
	cout << 3;
	
	count = count - 1;
	
	}
	
	if(num[1] == 1)
	{
		if( count != 1)
		cout << 5 << " " ;
		else
		cout << 5;
	}
	
	if(num[2] == 1)
	cout << 7;
	
	if(num[0] == 0 && num[1] == 0 && num[2] == 0 )
	cout << 'n';
	
	return 0;
}
int main()
{
int a;
scanf("%d",&a);
if(a%3 == 0 && (a%5 == 0 || a%7 == 0)){printf("3 ");}
if(a%3 == 0 && a%5 != 0 && a%7 != 0){printf("3");}
if(a%5 == 0 && a%7 == 0){printf("5 ");}
if(a%5 == 0 && a%7 != 0){printf("5");}
if(a%7 == 0){printf("7");}
if(a%3 != 0 && a%5 != 0 && a%7 != 0)printf("n");
return 0;
}
int main()
{
	int a;
	scanf("%d",&a);
	if(a%3==0&&a%5!=0&&a%7!=0)
	{
		printf("3");
	}
	else if(a%3==0)
	{
		printf("3 ");
	}
	if(a%5==0&&a%7!=0)
	{
		printf("5");
	}
	else if(a%5==0)
	{
		printf("5 ");
	}
	if(a%7==0)
	{
		printf("7");
	}
	if(a%3!=0&&a%5!=0&&a%7!=0)
	{
		printf("n");
	}
	return 0;
}
int main()
{
    int n,b3=0,b5=0,b7=0;
    cin>>n;
    if(n%3==0)
    {
    cout<<3;
    b3=1;
    }
    if(n%5==0)
    {
    if(b3!=0)
    cout<<' ';
    cout<<5;
    b5=1;
    }
    if(n%7==0)
    {
    if(b3!=0||b5!=0)
    cout<<' ';
    cout<<7;
    b7=1;
    }
    if(b3==0&&b5==0&&b7==0)
    cout<<'n';

}
int main(){
	int a;
    scanf("%d",&a);
	if(a%3==0&&a%7==0&&a%5==0){
		printf("3 5 7");
	}
	if(a%3!=0){
		if(a%5==0){
			if(a%7==0){
				printf("5 7");
			}
			else{
				printf("5");
			}
		}
		else{
			if(a%7==0){
				printf("7");
			}
			else{
				printf("n");
			}
		}
	}
	if(a%3==0&&a%5==0&&a%7!=0){
				printf("3 5");
		}
	if(a%3==0&&a%5!=0){
			if(a%7==0){
				printf("3 7");
			}
			else{
				printf("3");
			}
		}
	return 0;
}
int main ()
{
	int a , p ; // ??a???????? p?3 5 7????? p ?????
	cin >> a ; // ????a
    p = 0 ; // ???p?0
	if (a % 3 == 0 ) 
	{
		cout << "3" ;
		p = p + 1 ;
	} // ?? p ?????? ???? 3 ???????? ?????????? p?? 
	if (a % 5 == 0 )
	{
		if (p > 0)
		{
			cout << " 5" ;
		}
		else 
		{
			cout << "5" ;
		} // ???????????????a ?? 5???????? ???????
		p = p + 1 ; // p??
	}
	if (a % 7 == 0 )
	{
		if (p > 0)
		{
			cout << " 7" ;
		}
		else 
		{
			cout << "7" ;
		}
		p = p + 1 ;
	} // ???????????????? a ????  7 ????7 ?????
	if (p == 0) 
	{
		cout << "n" ;
	} // ??????????a ???? "n" 
	cout << endl ; // ????
	return 0 ;
}
int main()
{
	int n;
	cin>>n;//?????
	int a[3]={3,5,7};//????357
	if(n%3==0&&n%7==0&&n%5==0)//????3?5?7???????3 5 7??????????)
		cout<<"3 5 7";
	else if(!(n%3==0||n%7==0||n%5==0))
		cout<<"n";//????????????????n)
	else //???????????????3 5?? 3 7??5 7,???????
	{
		int k=0;
		int b[2];
		for(int i=0;i<3;i++)
		{
			if(n%a[i]==0)
			{ b[k]=a[i];
		    k=k+1;}
		}
		for(int j=0;j<k;j++)
		{
			if(j==k-1)cout<<b[j];
			else cout<<b[j]<<" ";
		}
	}
	return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	if(n%3==0)printf("3");
	if(n%3==0&&n%5==0)printf(" 5");
	if(n%3!=0&&n%5==0)printf("5");
	if(n%3==0||n%5==0)
		if(n%7==0)printf(" 7");
	if(n%3!=0&&n%5!=0)
		if(n%7==0)printf("7");
	if(n%3!=0&&n%5!=0&&n%7!=0)printf("n");
	return 0;
}
//********************************
//*?????3?5?7????   **
//*?????? 1300012855 **
//*???2013.9.26  **
//********************************


int main(void)
{
	int integer; // ????
	int situation = 0; // ?????????0
	cin >> integer;
	
// ??????????????????????????	
	if (integer % 3 == 0)
		situation += 3;
	if (integer % 5 == 0)
		situation += 5;
	if (integer % 7 == 0)
		situation += 7;
	switch (situation)
	{
	case 0:
		cout << 'n' << endl;
		break;
	case 3:
		cout << '3' << endl;
		break;
	case 5:
		cout << '5' << endl;
		break;
	case 7:
		cout << '7' << endl;
		break;
	case 8:
		cout << "3 5" << endl;
		break;	
	case 10:
		cout << "3 7" << endl;
		break;
	case 12:
		cout << "5 7" << endl;
		break;
	case 15:
		cout << "3 5 7" << endl;
		break;
	default:
		break;	
	}
	return 0;
}
int main()
{
	int a,b,c,d;
	scanf("%d",&a);
	b=a%3;
	c=a%5;
	d=a%7;
	if (b==0)
		if (c==0)
			if(d==0)
				printf("3 5 7");
			else
				printf("3 5");
		else
			if (d==0)
				printf("3 7");
			else 
				printf("3");
	else 
		if (c==0)
			if (d==0)
				printf("5 7");
			else 
				printf("5");
		else 
			if (d==0)
				printf("7");
			else
				printf("n");
	return 0;
}
main()
{
	int a,b,c,d;
scanf("%d",&a);
b=3;
c=5;
d=7;
if(a%3==0&&a%5==0&&a%7==0)
printf("%d %d %d\n",b,c,d);
else if(a%3==0&&a%5==0)
printf("%d %d\n",b,c);
else if(a%3==0&&a%7==0)
printf("%d %d\n",b,d);
else if(a%7==0&&a%5==0)
printf("%d %d\n",c,d);
else if(a%3==0)
printf("%d\n",b);
else if(a%5==0)
printf("%d\n",c);
else if(a%7==0)
printf("%d\n",d);
else
printf("n\n");
return 0;
}
void main(){
	int x;
	scanf("%d",&x);
	if(x%3==0 && x%5==0 && x%7==0){printf("3 5 7");return;}
	if(x%3!=0 && x%5!=0 && x%7!=0){printf("n");return;}
	if(x%3==0 && x%5==0){printf("3 5");return;}
	if(x%3==0 && x%7==0){printf("3 7");return;}
	if(x%5==0 && x%7==0){printf("5 7");return;}
	if(x%3==0){printf("3");return;}
	if(x%5==0){printf("5");return;}
	if(x%7==0){printf("7");return;}
}
int main()
{
	int n,flag=0;
	scanf("%d",&n);
	if(n%3==0)
	{
		printf("3");
		flag=1;
	}
	if(n%5==0)
	{
		if(flag)
			printf(" ");
		printf("5");
		flag=1;
	}
	if(n%7==0)
	{
		if(flag)
			printf(" ");
		printf("7");
		flag=1;
	}
	if(flag==0)
		printf("n");
	return 0;
}
int main()
{
	int n, a;
	scanf("%d",&n);
	a=0;
	if (n%3==0)
		printf ("3");
	else a=1;
	if (n%5+a==0)
		printf(" 5");
        else if (n%5-a==-1) printf("5");
        else a=a+1;
	if (n%7==0&&a==1) printf(" 7");
        else if (n%7==0&&a==0) printf(" 7");
        else if (n%7==0&&a==2) printf("7");
	else a=3;
    if (n%3==0||n%5==0||n%7==0)
		a=1;
	else printf("n");
return 0;

}
int main()
{
	int num=0;                 //???????num
    
	cin>>num;
	if (num%3==0&&num%5==0&&num%7==0)     //??num???3,5,7???????
		cout<<"3"<<" "<<"5"<<" "<<"7"<<endl;
	else if (num%3==0&&num%5==0&&num%7!=0)
		cout<<"3"<<" "<<"5"<<endl;
	else if (num%3==0&&num%5!=0&&num%7==0)
		cout<<"3"<<" "<<"7"<<endl;
    else if (num%3!=0&&num%5==0&&num%7==0)
		cout<<"5"<<" "<<"7"<<endl;
	else if (num%3==0&&num%5!=0&&num%7!=0)
		cout<<"3"<<endl;
	else if (num%3!=0&&num%5==0&&num%7!=0)
		cout<<"5"<<endl;
	else if (num%3!=0&&num%5!=0&&num%7==0)
		cout<<"7"<<endl;
	else if (num%3!=0&&num%5!=0&&num%7!=0)
		cout<<"n"<<endl;
    return 0;


}
int main()
{
	int a[4],m,i,j,b;
	scanf("%d",&m);
	for(i=3,b=0,j=1;j<=3;j++)
	{
		a[j]=m%i;
		if(a[j]==0)
		b=b+i;
		i=i+2;
	}
	switch(b)
	{
	case 0:printf("n");break;
	case 3:printf("3");break;
	case 5:printf("5");break;
	case 7:printf("7");break;
	case 8:printf("3 5");break;
	case 10:printf("3 7");break;
	case 12:printf("5 7");break;
	case 15:printf("3 5 7");break;
	}
	return 0;
}
void main()
{
	int a,b,c,d,e=3,f=5,g=7;
	char c1;
	scanf("%d",&a);
	b=a%3;c=a%5;d=a%7;
	c1='n';
	if (b==0)
		if (c==0)
		{
			if (d==0)
				printf("%d %d %d\n",e,f,g);
			else
				printf("%d %d\n",e,f);
		}
		else
		{
			if (d==0)
				printf("%d %d\n",e,g);
			else
				printf("%d\n",e);
		}
	else
		if (c==0)
		{
			if (d==0)
				printf("%d %d\n",f,g);
			else
				printf("%d\n",f);
		}

        else
		{
			if (d==0)
				printf("%d\n",g);
			else
				printf("%c\n",c1);
		}
}
int main(void)
{
	int a,three,five,seven,sum;
	scanf("%d",&a);
	three=(a%3==0);
	five=(a%5==0);
	seven=(a%7==0);
	sum=three+five+seven;
	if (sum==3)
		printf("3 5 7");
	if (sum==2)
		if (three==1)
		{
			printf("3");
			if (five==1)
				printf(" 5");
			else printf(" 7");
		}
		else printf("5 7");
	if (sum==1)
		if (three==1)
			printf("3");
		else if (five==1)
			printf("5");
		else printf("7");
	if (sum==0)
		printf("n");
}
int main()
{int n=0,s=0;//n???? s??n?????? 
cin>>n;
if (n%3==0){cout<<"3";s++;}
if (n%5==0){if (s!=0)cout<<' ';cout<<"5";s++;}if (n%7==0){if (s!=0)cout<<' ';cout<<"7";s++;}
if (s==0)cout<<"n";
return 0;
    }
int main(int argc, char* argv[])
{
    int a;
	scanf("%d", &a);
	if((a%3==0)&&(a%5==0)&&(a%7==0)){
		printf("3 5 7\n");
	}
	else if((a%3==0)&&(a%5==0)&&(a%7!=0)){
        printf("3 5\n");
	}
    else if((a%3==0)&&(a%5!=0)&&(a%7==0)){
        printf("3 7\n");
	}
    else if((a%3!=0)&&(a%5==0)&&(a%7==0)){
        printf("5 7\n");
	}
    else if((a%3==0)&&(a%5!=0)&&(a%7!=0)){
        printf("3\n");
	}
    else if((a%3!=0)&&(a%5==0)&&(a%7!=0)){
        printf("5\n");
	}
    else if((a%3!=0)&&(a%5!=0)&&(a%7==0)){
        printf("7\n");
	}
    else{
		printf("n\n");
	}
	return 0;
}
int main()
{
	int n;
	int t=0;
	cin>>n;
	if(n%3==0)                      //?????3,5,7??
		t=t+3;
	if(n%5==0)
		t=t+5;
	if(n%7==0)
		t=t+7;
	if(t==0)                            //????
		cout<<"n";
	if(t==3)
		cout<<3;
	if(t==5)
		cout<<5;
	if(t==7)
		cout<<7;
	if(t==8)
		cout<<"3 5";
	if(t==12)
		cout<<"5 7";
	if(t==10)
		cout<<"3 7";
	if(t==15)
		cout<<"3 5 7";
	return 0;
}
int main()
{
	int x,a,b,c,n;
	cin >> x;
	if (x%3==0)
		a=1;
	else 
		a=0;
	if (x%5==0)
		b=2;
	else
		b=0;
	if (x%7==0)
		c=4;
	else 
		c=0;

	n = a+b+c;

	if (n==7)
	{
		cout << "3 5 7" << endl;
	}
	else if (n==6)
	{
		cout << "5 7" << endl;
	}
	else if (n==5)
	{
		cout << "3 7" << endl;
	}
	else if (n==4)
	{
		cout << "7" << endl;
	}
	else if (n==3)
	{
		cout << "3 5" << endl;
	}
	else if (n==2)
	{
		cout << "5" << endl;
	}
	else if (n==1)
	{
		cout << "3" << endl;
	}
	else if (n==0)
	{
		cout << "n" << endl;
	}
	return 0;
}
int main(int argc, char* argv[])
{   int a,b,c,d;
    b=3;
	c=5;
	d=7;
	scanf("%d",&a);
	if(a%3==0&&a%5==0&&a%7==0){printf("%d %d %d",b,c,d);}
	else if(a%3==0&&a%5==0){printf("%d %d",b,c);}else if(a%3==0&&a%7==0){printf("%d %d",b,d);}else if(a%5==0&&a%7==0){printf("%d %d",c,d);}else if(a%3==0){printf("%d",b);}else if(a%5==0){printf("%d",c);}else if(a%7==0){printf("%d",d);}else{printf("n");}
	return 0;
}
void main()
{int a;
scanf("%d",&a);
if(a%3==0&&a%5==0&&a%7==0) printf("3 5 7");
else if(a%7!=0)
{if(a%3==0&&a%5==0) printf("3 5");
     if(a%3==0&&a%5!=0) printf("3");
	      if(a%5==0&&a%3!=0) printf("5");
		  if(a%3!=0&&a%5!=0) printf("n");}
if(a%7==0)
{if(a%3!=0&&a%5!=0) printf("7");
if(a%3==0&&a%5!=0) printf("3 7");
if(a%5==0&&a%3!=0) printf("5 7");}
}
//******************************************
//*??: ??(4-4) ??3?5?7????  **
//*??: ??? 1300012991 **
//*??: 2013?9?30? **
//******************************************

int main()

{
	int x, a, b, c;
	cin >> x;
	if ( x % 105 == 0 )
		cout << "3 5 7";
	else if ( x % 15 == 0 )
		cout << "3 5";
    else if ( x % 35 == 0 )
		cout << "5 7";
    else if ( x % 21 == 0 )
		cout << "3 7";
	else if ( x % 3 == 0 )
		cout << "3";
	else if ( x % 5 == 0 )
		cout << "5";
    else if ( x % 7 == 0 )
		cout << "7";
	else
		cout << "n";

return 0;

}
int main()
{
	int a;
	scanf("%d",&a);
	if(a%3==0&&a%5==0&&a%7==0)
		printf("%d %d %d",3,5,7);
	else
	{
		if(a%3==0&&a%5==0)
			printf("%d %d\n",3,5);
		else 
		{
			if(a%3==0&&a%7==0)
				printf("%d %d",3,7);
			else
			{
				if(a%5==0&&a%7==0)
					printf("%d %d",5,7);
				else
				{
					if(a%3==0)
						printf("%d",3);
					else 
					{
						if(a%5==0)
							printf("%d",5);
						else
						{
							if(a%7==0)
								printf("%d",7);
							else
								printf("n\n");
						}
					}
				}
			}
		}
	}
	return 0;
}
int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	if(n%3==0&&n%5==0&&n%7==0)
		printf("3 5 7");
    if(n%3==0&&n%5==0&&n%7!=0)
	    printf("3 5");
	if(n%3==0&&n%5!=0&&n%7==0)
		printf("3 7");
	if(n%3!=0&&n%5==0&&n%7==0)
		printf("5 7");
	if(n%3!=0&&n%5!=0&&n%7!=0)
		printf("n");
	if(n%3==0&&n%5!=0&&n%7!=0)
		printf("3");
	if(n%3!=0&&n%5!=0&&n%7==0)
		printf("7");
	if(n%3!=0&&n%5==0&&n%7!=0)
		printf("5");
	return 0;
}
void main()
{
	int a,b,c,d;char n;
	b=3;
	c=5;
	d=7;n='n';
	scanf("%d",&a);
	if(a%b==0)
	{
		if(a%c==0)
		{
			if(a%d==0)
			{
				printf("%d %d %d",b,c,d);
			}
			else
				printf("%d %d",b,c);
		}
		else
		{
			if(a%d==0)
			{
				printf("%d %d",b,d);
			}
			else
				printf("%d",b);
		}
	}
	else
	{
        if(a%c==0)
		{
			if(a%d==0)
			{
				printf("%d %d",c,d);
			}
			else
				printf("%d",c);
		}
		else
		{
			if(a%d==0)
			{
				printf("%d",d);
			}
			else
				printf("%c",n);
		}
	}
	return 0;
}
int main()
{
	int x;
	cin>>x;
    if(x%105==0)cout<<3<<" "<<5<<" "<<7<<endl;
	else if(x%35==0)cout<<5<<" "<<7<<endl;
   	else if(x%21==0)cout<<3<<" "<<7<<endl;
    else if(x%15==0)cout<<3<<" "<<5<<endl;
    else if(x%7==0)cout<<7<<endl;
	else if(x%5==0)cout<<5<<endl;
	else if(x%3==0)cout<<3<<endl;
	else if(x%3!=0&&x%5!=0&&x%7!=0)cout<<"n"<<endl;
	return 0;
}
int oper;
void p(int n);
int main()
{
	int num;
	scanf("%d", &num);
	oper = 0;

	if(num%3 == 0)
		p(3);
	if(num%5 == 0)
		p(5);
	if(num%7 == 0)
		p(7);
	if(num%3 != 0 && num%5 != 0 && num%7 != 0)
		printf("n");
	return 0;
}
void p(int n)
{
	if(oper)
		printf(" ");
	printf("%d", n);
	oper = 1;
}
int main()
{
	int x;
	int flag=0;

	scanf("%d", &x);

	if (x%3==0)
	{
		printf("3");
		flag = 1;
	}
	if (x%5==0)
	{
		if (flag==1)
		{
			printf(" ");
		}
		flag=1;
		printf("5");

	}
	if (x%7==0)
	{
		if (flag==1)
		{
			printf(" ");
		}
		flag=1;
		printf("7");
	}
	if (x%3!=0 && x%5!=0 && x%7!=0)
	{
		printf("n");
	}

	return 0;
}
int main()
{
	int n;
	int t=0;
	scanf("%d",&n);
	if (n % 3==0){
		printf("%d",3);
		t++;
	}
    if (n % 5==0){
		if (t){
			printf(" ");
		}
		printf("5");
		t++;
	}
	if (n % 7==0){
        if (t){
			printf(" ");
		}
		printf("%d",7);
		t++;
	}
	if (t==0){
		printf("n");
	}
	printf("\n");

	return 0;
}