semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
void main()
{
	int k;
	scanf("%d",&k);
if(k%3==0&&k%5==0&&k%7==0)
printf("3 5 7");
else if(k%3==0&&k%5==0)
printf("3 5");
else if(k%3==0&&k%7==0)
printf("3 7");
else if(k%5==0&&k%7==0)
printf("5 7");
else if(k%3==0)
printf("3");
else if(k%5==0)
printf("5");
else if(k%7==0)
printf("7");
else
printf("n");
}
int main ()
{
    int a,j=0,i=3,k=0;
    cin >>a;
    while (i<=7)
    {
         if (a%i==0)
         j++;
         i+=2;
    }
    if (j==0)
    cout <<"n";
    else
    {
        i=3;
        while (i<=7)
        {
              if (a%i!=0)
              {
                i+=2;
                continue;
              }
              cout <<i;
              i+=2;
              k++;
              if (k==j)
              break;
              cout <<" ";
        }
    } 
    return 0;
}
void main()
{
	int n,i=0;
	scanf("%d",&n);
	if(n%3==0)
	{
		printf("3");
		i=1;
	}
	if(n%5==0)
	{
		if(i==0)
		{
			printf("5");
			i=1;
		}
		else if(i==1)
		{
			printf(" 5");
			
		}
	}
	if(n%7==0)
	{
if(i==0)
		{
			printf("7");
			i=1;
		}
		else if(i==1)
		{
			printf(" 7");
			
		}
	}
	if(i==0)
		printf("n");
	
}
int main()

{
	int n,a,b,c,t;
	scanf("%d",&n);
	a=n%3;
	b=n%5;
	c=n%7;
	if(a==0&&b==0&&c==0)
		t=1;
	if(a!=0&&b==0&&c==0)
		t=2;
	if(a==0&&b!=0&&c==0)
		t=3;
	if(a==0&&b==0&&c!=0)
		t=4;
	if(a!=0&&b!=0&&c==0)
		t=5;
	if(a!=0&&b==0&&c!=0)
		t=6;
	if(a==0&&b!=0&&c!=0)
		t=7;
	if(a!=0&&b!=0&&c!=0)
		t=8;
	switch(t)
	{
	case 1:
		printf("3 5 7\n");
		break;
	case 2:
		printf("5 7\n");
		break;
	case 3:
		printf("3 7\n");
		break;
	case 4:
		printf("3 5\n");
		break;
	case 5:
		printf("7\n");
	    break;
	case 6:
		printf("5\n");
		break;
	case 7:
		printf("3\n");
		break;
	case 8:
		printf("n\n");
	}
	return 0;

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


}
int main (void)
{
	int num = 0;
	cin >> num;

	if (!(num % 105))
		cout << "3 5 7" << endl;
	else if (!(num % 35))
		cout << "5 7"<< endl;
	else if (!(num % 21))
		cout <<"3 7"<<endl;
	else if (!(num % 15))
		cout << "3 5"<<endl;
	else if (!(num % 7))
		cout << '7'<<endl;
	else if (!(num % 5))
		cout << '5'<<endl;
	else if (!(num % 3))
		cout << '3'<<endl;
	else
		cout <<'n'<<endl;

	return 0;
}
int main(){
	int num, leap_1=0 , leap_2=0 ,leap_3=0;
	scanf("%d", &num);
	if (num%3== 0){
		leap_1=1;
	}
    if (num%5== 0){
		leap_2=1;
	}
    if (num%7== 0){
		leap_3=1;
	}
	if (leap_1 * leap_2 * leap_3 == 1){
		printf("3 5 7");
	}
	else if (leap_1 * leap_2 == 1){
		printf("3 5");
	}
	else if (leap_1 * leap_3 == 1){
		printf("3 7");
	}
	else if (leap_2 * leap_3 == 1){
		printf("5 7");
	}
	else if (leap_1 == 1){
		printf("3");
	}
	else if (leap_2 == 1){
		printf("5");
	}
	else if (leap_3 == 1){
		printf("7");
	}
	else {
		printf("n");
	}
	return 0;
}
int main()
{
	int a;

	scanf("%d",&a);
	 if(a%3==0&&a%5==0&&a%7==0){
		printf("3 5 7");
	}
	 else if(a%3==0&&a%5==0&&a%7!=0){printf("3 5");}
	 else if(a%3==0&&a%5!=0&&a%7==0){printf("3 7");}
	 else if(a%3!=0&&a%5==0&&a%7==0){printf("5 7");}
	 else if(a%3!=0&&a%5!=0&&a%7==0){printf("7");}
else if(a%3==0&&a%5!=0&&a%7!=0){printf("3");}
else if(a%3!=0&&a%5==0&&a%7!=0){printf("5");}
else if(a%3!=0&&a%5!=0&&a%7!=0){printf("n");}

	return 0;
}
//*****************************************************************
//* file 3.cpp                                                    *
//* name ??                                                     *
//* date 2012-9-29                                                *
//* description ??3 5 7????                                 *
//*****************************************************************
int main()                                    // ???
{                                             // ?????
	int m;                                    // ??????m
	cin >> m;                                 // ??m
	if ((m % 3 == 0) && (m % 5 == 0) && (m % 7 == 0))
		cout << "3 5 7" << endl;              // ??m??3 5 7????????3 5 7
	else                                      
		if (m % 3 == 0)                       // ?????1???m??3?????
		  if (m % 5 == 0)                     
			  cout << "3 5" << endl;          // ?m???5??????3 5
		  else
			  if (m % 7 == 0)                 
				  cout << "3 7" << endl;      // ?m???7??????3 7
			  else 
				  cout << "3" << endl;        // ????3
		else 
			if (m % 5 == 0)                   // ?????2???m??5??????
			   if (m % 7 == 0)
				   cout << "5 7" << endl;     // ?m???7??????5 7 
			   else cout << "5" << endl;      // ????5
		else 
			if (m % 7 == 0)
				cout << "7" << endl;          // ?????3???m??7????????7 
		else
			cout << "n" << endl;              // ?????4?????3 5 7?????n
		return 0;                             
}                                             // ?????
int main()
{
int x,sum=0;
cin>>x;
if(x%3==0)
sum=sum+3;
if(x%5==0)
sum=sum+5;
if(x%7==0)
sum=sum+7;
switch(sum)
{
case 15:cout<<"3 "<<"5 "<<"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 3:cout<<"3"<<endl;break;
case 5:cout<<"5"<<endl;break;
case 7:cout<<"7"<<endl;break;
default:cout<<"n"<<endl;break;
}
return 0;
}
int main()
{
	int a,b,c,d,e,f,g,h;
	scanf("%d",&a);
    b=a%3;
    c=a%5;
    d=a%7;
    e=a%15;
    f=a%21;
    g=a%35;
    h=a%105;
    if(h==0)
    printf("3 5 7\n");
    else if(e==0)
    printf("3 5\n");
    else if(f==0)
    printf("3 7\n");
    else if(g==0)
    printf("5 7\n");
    else if(b==0)
    printf("3\n");
    else if(c==0)
    printf("5\n");
    else if(d==0)
    printf("7\n");
    else printf("n");
	return 0;
}
int main()
{
	int a,b,c,i;
	scanf("%d",&i);
	a=i%3==0;
	b=i%5==0;
	c=i%7==0;
	if(a+b+c==3) printf("3 5 7\n");
	else if(a+b==2) printf("3 5\n");
	else if(a+c==2) printf("3 7\n");
	else if(b+c==2) printf("5 7\n");
	else if(a==1) printf("3\n");
	else if(b==1) printf("5\n");
	else if(c==1) printf("7\n");
	else printf("n\n");
	return 0;
}
int max(int a,int b){
	if(a>b) return a;
	else return b;
}
int min(int a,int b){
    if(a>b) return b;
	else return a;
}
int main(){
	int n,count=0,i=0,a[3]={0,0,0};
	scanf("%d",&n);
	if(n%3==0){
		count++;a[count-1]=3;i=3;}
	if(n%5==0){
		count++;a[count-1]=5;i=5;}
	if(n%7==0){
		count++;a[count-1]=7;i=7;}
	if(count==0)
		printf("n");
	if(count==1)
		printf("%d",i);
	if(count==2)
		printf("%d %d",min(a[0],a[1]),max(a[0],a[1]));
	if(count==3)
		printf("3 5 7");
	return 0;
}
int main(){
	int a;
	scanf("%d",&a);
	if(a%105==0){
		printf("3 5 7");
	}
    else{
		if(a%15==0){
			printf("3 5");
		}
		else if(a%21==0){
			printf("3 7");
		}
		else if(a%35==0){
			printf("5 7");
		}
		else{
			if(a%3==0){
				printf("3");
			}
			else if(a%5==0){
				printf("5");
			}
			else if(a%7==0){
				printf("7");
			}
			else{
				printf("n");
			}
		}
		return 0;
	}
}
int main()
{
	int a=0;
	cin>>a;
	if (a%3==0&&a%5==0&&a%7==0)
		cout<<"3 "<<"5 "<<"7"<<endl;
	else
		if (a%3==0&&a%5==0)
			cout<<"3 "<<"5"<<endl;
		else if (a%3==0&&a%7==0)
			cout<<"3 "<<"7"<<endl;
		else if (a%5==0&&a%7==0)
			cout<<"5 "<<"7"<<endl;
		else
			if (a%3==0)
				cout<<"3"<<endl;
			else if (a%5==0)
				cout<<"5"<<endl;
			else if (a%7==0)
				cout<<"7"<<endl;
			else
				cout<<"n"<<endl;
			return 0;
}
int main(){
	static int a,can[3],flag=0;
	cin>>a;
	if(a%3==0){
		can[0]=1;flag=1;
	}
	if(a%5==0){
		can[1]=1;flag=1;
	}
	if(a%7==0){
		can[2]=1;flag=1;
	}
	if(flag){
		for(int i=2;i>=0;i--)
			if(can[i]){
				can[i]=2;break;
			}
	}
	if(can[0])cout<<3;
	if(can[0]==1)cout<<" ";
	if(can[1])cout<<5;if(can[1]==1)cout<<" ";
	if(can[2])cout<<7;if(can[2]==1)cout<<" ";
	if(flag==0)cout<<"n";
	cout<<endl;
	return 0;
}
int main()
{
    int n,k=0;
    scanf("%d",&n);
    if(n%3==0)
    {
         printf("3");
         k++;
    }
    if(n%5==0)
    {
         if(k==0)
         {
                 printf("5");
                 k++;
         }
         else
         {printf(" 5");k++;}
    }
    if(n%7==0)
    {
         if(k==0)
         {
                 printf("7");
                 k++;
         }
         else
         {printf(" 7");k++;}
    }
    if(k==0)
    printf("n");
    return 0;
}
int main()
{
    int x,a[3],i=0,j;  //???????????????????????
    scanf("%d",&x);     //????
    if (x%3==0)        //????????3?5?7???????????
    {
        a[i]=3;
        i++;          //?????????????
    }
    if (x%5==0)
    {
        a[i]=5;
        i++;
    }
    if (x%7==0)
    {
        a[i]=7;
        i++;
    }
    if (i==0)              //??????????
        printf("n");
    if (i==1)
    	printf("%d",a[0]);
    if(i>1)
    {
    	for(j=0;j<i-1;j++)
    		printf("%d ",a[j]);
    	printf("%d",a[i-1]);     //????????
    }
    return 0;
}
int main()
{
	int a=0;
	cin>>a;
	if(a%3==0&&a%5==0&&a%7==0)
		cout<<3<<" "<<5<<" "<<7;
	else 
		if(a%3!=0&&a%5==0&&a%7==0)
			cout<<5<<" "<<7;
		
		else 
			if(a%3==0&&a%5!=0&&a%7==0)
				cout<<3<<" "<<7;
			
			else 
				if(a%3==0&&a%5==0&&a%7!=0)
					cout<<3<<" "<<5;
				else 
					if(a%3!=0&&a%5==0&&a%7!=0)
						cout<<5;
					
					else 
						if(a%3!=0&&a%5!=0&&a%7==0)
							cout<<7;
						
						else 
							if(a%3==0&&a%5!=0&&a%7!=0)
								cout<<3;
							
else 
								
cout<<"n";
return 0;
								
								
								
								
}
int main(int argc, char* argv[])
{
	
	int a;
	scanf ("%d",&a);
	if (a%105==0)
		printf("3 5 7");
	if (a%15==0&&a%7!=0)
		printf("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;
}
int main()
{
    int a;
    scanf("%ld",&a);
    if(a%3==0&&a%5==0&&a%7==0)
    {
        printf("3 5 7");
    }
    else if (a%3==0&&a%5==0)
    {
        printf("3 5");
    }
    else if (a%3==0&&a%7==0)
    {
        printf("3 7");
    }
    else if (a%3==0&&a%5==0)
    {
        printf("3 5");
    }
    else if (a%7==0&&a%5==0)
    {
        printf("5 7");
    }
    else if (a%3==0)
    {
        printf("3");
    }
    else if (a%7==0)
    {
        printf("7");
    }
    else if (a%5==0)
    {
        printf("5");
    }
    else
    {
        printf("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&&a%7!=0)
		printf("%d %d",3,5);
    else if (a%3==0&&a%5!=0&&a%7==0)
		printf("%d %d",3,7);
    else if (a%3!=0&&a%5==0&&a%7==0)
		printf("%d %d",5,7);
    else if (a%3==0&&a%5!=0&&a%7!=0)
		printf("%d",3);
    else if (a%3!=0&&a%5==0&&a%7!=0)
		printf("%d",5);
    else if (a%3!=0&&a%5!=0&&a%7==0)
		printf("%d",7);
    else printf("n");
}
int main()
{
	int three(int x);
	int five(int x);
	int seven(int x);
	int print(int a,int b,int c);
	int a,b,c,x;
	scanf("%d",&x);
	a=three(x);
	b=five(x);
	c=seven(x);
	print(a,b,c);
	return 0;
}
int three(int x){
	int d;
	d=(x%3==0)?1:0;
	return d;
}
int five(int x){
	int d;
	d=(x%5==0)?1:0;
	return d;
}
int seven(int x){
	int d;
	d=(x%7==0)?1:0;
	return d;
}
int print(int a,int b,int c){
	if(a==1){
		printf("3");
		if(b==1||c==1){
			printf(" ");
		}
	} 
	if(b==1){
		printf("5");
		if(c==1){
			printf(" ");
		}
	}
	if(c==1){
		printf("7");
	}
	if(a==0&&b==0&&c==0){
		printf("n");
	}
	return 0;
}
/************************************
 *   ?????3,5,7????		*
 *   ??????  1200012815		*
 *   ???2012.9.25				*
 ************************************/
int main()
{
	int a;
	cin >> a;									//???????a
	if (a % 3 == 0 && a % 5 == 0 && a % 7 == 0) //?????????? 
		cout << "3 5 7" << endl;
	else if (a % 3 == 0 && a % 5 == 0)				
		cout << "3 5" << endl;
	else if (a % 3 == 0 && a % 7 == 0)
		cout << "3 7" << endl;
	else if (a % 5 == 0 && a % 7 == 0)			//????????????
		cout << "5 7" << endl;
	else if (a % 5 == 0)
		cout << "5" << endl;
	else if (a % 7 == 0)
		cout << "7" << endl;
	else if (a % 3 == 0)
		cout << "3" << endl;					//???????????
	else 
		cout << "n" << endl;					//????

}
main()
{
   int n;
   scanf("%d",&n);
   if(n%3==0)
	   if(n%5==0)
		   if(n%7==0)
			   printf("3 5 7");
		   else
			   printf("3 5");
   if(n%3==0)
	   if(n%7==0)
            if(n%5!=0)
				printf("3 7");
   if(n%5==0)
	   if(n%7==0)
            if(n%3!=0)
				printf("5 7");
	if(n%5!=0)
	   if(n%7!=0)
           if(n%3!=0)
				printf("n");
	if(n%5==0)
	   if(n%7!=0)
            if(n%3!=0)
				printf("5");
	if(n%5!=0)
	   if(n%7==0)
            if(n%3!=0)
				printf("7");
	if(n%5!=0)
	   if(n%7!=0)
            if(n%3==0)
				printf("3");


}
int main()
{
	int a;
	scanf("%d", &a);
	if(a%3==0){
		printf("3");
		if(a%5==0){
			printf(" 5");
		}
		if(a%7==0){
			printf(" 7");
		}
	}
	else if(a%5==0){
		printf("5");
		if(a%7==0){
			printf(" 7");
		}
	}
	else if(a%7==0){
		printf("7");
	}
	else{
		printf("n");
	}
	return 0;
}
/*
* file : ??3 5 7???
* author:??? 1200012911
* time : 2012.9.29
*/

int main()
{
	int n, sum;           //????
	//cout  <<"???????" <<endl;      //????
	cin >> n ;                        //?????
	sum = (n%3 == 0) +(n%5 == 0) + (n%7 ==0) ;  //???????
	switch(sum)
	{
	case 0 : cout <<"n" ;break;          //n??3?5?7??
	case 1 : cout <<(n%3 ==0? "3":(n%5 == 0?"5":"7"));break;  //n??????????????
	case 2 : cout <<(n%3 !=0 ? "5 7" : (n%5 !=0 ? "3 7":"3 5")) ;break;
		//n???????????????
	case 3 : cout <<"3 5 7" ;break;   //n??????
	}                         
	cout <<endl;            //??
	return 0;
}                     //?????
int main(){
	int a;
	scanf("%d",&a);
	if(a%3==0){
		if(a%5==0&&a%7==0){
			printf("%d %d %d",3,5,7);
		}else{
			if(a%5==0){
				printf("%d %d",3,5);
			}else{
				if(a%7==0){
					printf("%d %d",3,7);
				}else{
				printf("%d",3);
				}
			}
		}
	}else{
		if(a%5==0){
			if(a%7==0){
				printf("%d %d",5,7);
			}else{
				printf("%d",5);
			}
		}else{
			if(a%7==0){
				printf("%d",7);
			}else{
				printf("n");
			}
		}
	}
	return 0;
}
int main()
    {
    int a;
scanf("%d",&a);
if(a%3==0)
{
       if(a%5==0)
       {
               if(a%7==0)
                        printf("3 5 7");
                        else
                        printf("3 5");
                        }
                        else
                        {
                            if(a%7==0)
                            printf("3 7");
                            else
                            printf("3");
                            }
                        }
                        else
                        {
                            if(a%5==0)
                        {
                                 if(a%7==0)
                                 printf("5 7");
                                 else
                                 printf("5");
                                 }
                                 else
                                 {
                                     if(a%7==0)
                                     printf("7");
                                     else
                                     printf("n");
                                     }
                                     }
                        return 0;
                        }
//******************
//*?????3?5?7????**
//*?????1200012922**
//*???2012.9.28**
//******************

int main()    
{
	int a;//??a???
	int x;//??x??? 
	x = 0;//??x?0
	cin >> a;//??a
	if(a % 3 == 0)
    {
		x = 1;
		cout << 3 ;//??a??3?????3?x=1
	};
	if(a % 5 == 0)
	{ 
		{if(x==1)
			cout<<" ";}
		x = 1;
		cout << 5;};	//??a??5?????x?1???5????????5
		if(a % 7 == 0)
		{
			{if(x == 1)
				cout << " ";}
			cout << 7;};	//??a??7?????x?1???7????????7
			if(a % 3 != 0 && a % 5 != 0 && a % 7 != 0)
				cout << 'n' << endl;//a???3,5,7?????n
			
			return 0;
}
//**********************************
//****       ??????     *****
//****        1200016612      *****
//**  ?????3?5?7????  **
//**********************************
int main()                           //?????
{
	int m=0,i=3,j=0;                     //??????m,i,??i??????????3
	cin>>m;
	if(m%3==0||m%5==0||m%7==0)       //??m????????????????????
	{while(i<8)                      //?i?3,5,7?????i??m?????i??
	    {if(m%i==0)                  
		{j=j+1;                       //j??????j=1?????????????????
	    if(j==1) cout<<i;
	    else if(j==2||j==3) cout<<" "<<i;   
	}
		i=i+2;}
	 }
	else                             //??m???3,5,7??????????n
		cout<<"n"<<endl;
	return 0;
}
void main()
{
int n,i,j,k;
scanf("%d",&n);
i=n%3;
if(i==0)
{
printf("3");
}
j=n%5;
if(j==0)
{
if(i==0)
printf(" 5");
else
printf("5");
}

k=n%7;
if(k==0)
{
if(i==0||j==0)
printf(" 7");
else
printf("7");
}
if(i!=0&&j!=0&&k!=0)
printf("n");
}
int main()
{
	int a,b=3,c=5,d=7;
	scanf("%d",&a);
	if(a%b==0&&a%c==0&&a%d==0)
	{
		printf("%d %d %d",b,c,d);
	}
	else if(a%b==0&&a%c==0&&a%d!=0)
	{
		printf("%d %d",b,c);
	}
	else if(a%b==0&&a%d==0&&a%c!=0)
	{
		printf("%d %d",b,d);
	}
	else if(a%c==0&&a%d==0&&a%b!=0)
	{
		printf("%d %d",c,d);
	}
	else if(a%c==0&&a%d!=0&&a%b!=0)
	{
		printf("%d",c);
	}
	else if(a%b==0&&a%c!=0&&a%d!=0)
	{
		printf("%d",b);
	}
	else if(a%d==0&&a%c!=0&&a%b!=0)
	{
		printf("%d",d);
	}
    else if(a%d!=0&&a%c!=0&&a%b!=0)
	{
		printf("n");
	}
	return 0;
}
int main(){
	int a;
	scanf("%d",&a);
	if(a%3==0&&a%5==0&&a%7==0)
	{printf("3 5 7");};
	if(a%3!=0&&a%5==0&&a%7==0)
	{printf("5 7");};
	if(a%3==0&&a%5!=0&&a%7==0)
	{printf("3 7");};
	if(a%3==0&&a%5==0&&a%7!=0)
	{printf("3 5");};
	if(a%3==0&&a%5!=0&&a%7!=0)
	{printf("3");};
	if(a%3!=0&&a%5==0&&a%7!=0)
	{printf("5");};
	if(a%3!=0&&a%5!=0&&a%7==0)
	{printf("7");};
	if(a%3!=0&&a%5!=0&&a%7!=0)
	{printf("n");};
	return 0;
}
int main()
{
  int n,i=0;//n??????
  cin>>n;
  if(n%3==0)i++;
  if(n%5==0)i++;
  if(n%7==0)i++;
  if(i==3)cout<<"3 5 7";
  if(i==2)
    {
          if(n%3!=0)cout<<"5 7";
          if(n%5!=0)cout<<"3 7";
          if(n%7!=0)cout<<"3 5";          
          }
  if(i==1)
    {
          if(n%3==0)cout<<"3";
          if(n%5==0)cout<<"5";
          if(n%7==0)cout<<"7";          
          }
  if(i==0)cout<<"n";
  cin.get();
  cin.get();
  return 0;
}
int main()
{
    int aaa=0;
     
    int num ;
 
    cin >> num ;
 
    if (num % 3 == 0 )
    {
            cout << 3 ;       
            aaa=3;
    }
    if (num % 5 == 0 )
    {
            if(aaa!=0)
                cout << " " ;    
            cout << 5 ;       
            aaa=5;         
    }
    if (num % 7 == 0 )
    {
            if(aaa!=0)
                cout << " " ;    
            cout << 7;     
            aaa=7;
    }
 
   if(aaa == 0)
        cout << "n" << endl ;
 
    return 0 ;
}
void main()
{
	int a,i3,i5,i7;
	scanf("%d",&a);
	i3=0;i5=0;i7=0;
	if(a%3==0) i3=1;
	if(a%5==0) i5=1;
	if(a%7==0) i7=1;
	if(i3==1)
	{
		printf("3");
		if(i5==1)
		{
			printf(" 5");
			if(i7==1)
				printf(" 7");
		}
		else if(i7==1) printf(" 7");
	}
	else if(i5)
	{
		printf("5");
		if(i7) printf(" 7");
	}
	else if(i7)
	{
		printf("7");
	}
	else printf("n");
}
int main(){
	int sz[3]={3,5,7};
	int n;
	scanf("%d",&n);
	int i;
	int flag=0;
	int isfirsttime=1;

	for(i=0;i<3;i++){
			if(n%sz[i]==0){
				if(!isfirsttime){
				printf(" %d",sz[i]);
				flag=1;
				}else{
					printf("%d",sz[i]);
					flag=1;
					isfirsttime=0;

				}

			}
	


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

    return 0;

}
void main()
{
     int a,b=0,c=0,r=0;
	 scanf("%d",&a);
     if (a%3==0) b=3;
	 if (a%5==0) c=5;
	 if (a%7==0) r=7;
	 if (b>0) printf("3");
	 if (c>0&&b>0) printf(" 5");
	   else if(c>0) printf("5");
	 if (r>0&&(c>0||b>0)) printf(" 7");
	    else if (r>0) printf("7");
     if(b==0&&c==0&&r==0) printf("n");
}
void main()
{
	int x,i;
	scanf("%d",&x);
    if(x%3==0)
	{printf("%d",3);
	for(i=5;i<=7;i=i+2)
		if(x%i==0)
		{printf(" %d",i);}
	}
	else
	{if(x%5==0)
		{printf("%d",5);
	     if(x%7==0)printf(" %d",7);}
	else if(x%7==0)printf("%d",7);}
		
        if(x%3!=0&&x%5!=0&&x%7!=0)
			printf("n");
		printf("\n");
}
void main()
{int a;
 scanf("%d",&a);
 if(a%105==0) printf("3 5 7\n");
 else if(a%15==0&&a%7!=0) printf("3 5\n");
 else if(a%21==0&&a%5!=0) printf("3 7\n");
 else if(a%35==0&&a%3!=0) printf("5 7\n");
 else if(a%35!=0&&a%3==0) printf("3\n");
 else if(a%21!=0&&a%5==0) printf("5\n");
 else if(a%15!=0&&a%7==0) printf("7\n");
 else  printf("n\n");
 }
int main() {
int i;
scanf("%d",&i);
if(i%3==0 && i%5==0 && i%7==0){
	printf("3 5 7");
}else{
if(i%15==0){
	printf("3 5");
}else{
if(i%21==0){
	printf("3 7");
}else{
if(i%35==0){
	printf("5 7");
}else{
if(i%3==0){
	printf("3");
}else{
if(i%5==0){
	printf("5");
}else{
if(i%7==0){
	printf("7");
}else{
	printf("n");
}
}
}
}
}
}
}	
return 0;
}
int main()
{
   int x;
   scanf("%d",&x);
       if(x%105==0)
       {
         printf("3 5 7",x);
	   }
       else if(x%15==0)
	   {
	     printf("3 5",x);
	   }
	   else if(x%21==0)
	   {
	     printf("3 7",x);
	   }
	   else if(x%35==0)
	   {
	     printf("5 7",x);
	   }
	   else if(x%3==0)
	   {
	     printf("3",x);
	   }
	   else if(x%5==0)
	   {
	     printf("5",x);
	   }
	   else if(x%7==0)
	   {
	     printf("7",x);
	   }
	   else
	   {
         printf("n",x);
	   }
	   return 0;
}
//
//  main.cpp
//  ds
//
//  Created by Love on 12-12-27.
//  Copyright (c) 2012? Love. All rights reserved.
//


int main(){
    int num,i=1;
    scanf("%d",&num);
    if (num%3==0) {
        printf("3");
        i=0;
    }
    if (num%5==0) {
        if (i==0) {
            printf(" ");
        }
        printf("5");
        i=0;
    }
    if (num%7==0) {
        if (i==0) {
            printf(" ");
        }

        printf("7");
        i=0;
    }
    if (i==1) {
        printf("n");
    }    return 0;
        
    
}
void main ()
{
	float n;
	int help,j,a,b;
	float x,i;
	j=2;
	a=0;b=1;

	scanf("%f",&n);

	for(i=3;i<8;i=i+2)
	{
		x=n/i;
		help=n/i;
		if (x==help) a=a+b;
		j=j+2;
		b=b*2;
		//printf("%d %f %d\n",a,x,help);
	}

	switch(a)
	{
	 case 0:printf("n");break;
	 case 1:printf("3");break;
	 case 2:printf("5");break;
	 case 3:printf("3 5");break;
	 case 4:printf("7");break;
     case 5:printf("3 7");break;
	 case 6:printf("5 7");break;
	 case 7:printf("3 5 7");break;
	 default:;
	}
}
int main(int argc, char* argv[])
{
	int x;
	scanf("%d",&x);
	if(x%3==0&&x%5==0&&x%7==0)
	{
		printf("3 5 7");
	}
	else
	{
		if(x%3==0&&x%5==0&&x%7!=0)
		{
			printf("3 5");
		}
		else
		{
			if(x%3==0&&x%5!=0&&x%7==0)
			{
				printf("3 7");
			}
			else
			{
				if(x%3!=0&&x%5==0&&x%7==0)
				{
					printf("5 7");
				}
				else
				{
					if(x%3==0&&x%5!=0&&x%7!=0)
					{
						printf("3");
					}
					else
					{
						if(x%3!=0&&x%5==0&&x%7!=0)
						{
							printf("5");
						}
						else
						{
							if(x%3!=0&&x%5!=0&&x%7==0)
							{
								printf("7");
							}
							else
							{
								printf("n");
							}
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
    int a;
    cin >> a;
    if (a % 105 == 0)
        cout << "3 5 7" << endl;
    if (a % 15 == 0 && a % 105 != 0)
        cout << "3 5" << endl;
    if (a % 35 == 0 && a % 105 != 0)
        cout << "5 7" <<endl;
    if (a % 21 == 0 && a % 105 != 0)
        cout << "3 7" <<endl;
    if (a % 3 == 0 && a % 5 != 0 && a % 7 != 0)
        cout << "3" <<endl;
    if (a % 5 == 0 && a % 3 != 0 && a % 7 != 0)
        cout << "5" <<endl;
    if (a % 7 == 0 && a % 3 != 0 && a % 5 != 0)
        cout << "7" <<endl;
    if (a % 7 != 0 && a % 3 != 0 && a % 5 != 0)
        cout << "n" <<endl;
        
    return 0;
}