#include<iostream.h>
void main()
{
int k[20];
int i,j,n,s,m;
cout<<"input the fanwei:";
cin>>m;
for(j=2;j<=m;j++)
{
n=0;
s=j;
for(i=1;i<j;i++)
{
if((i%j)==0)
{
n++;
s=s-i;
k[n]=i;
}
}
if(s==0)
{
cout<<j<<"is a wanshu,its yinzi are:";
for(i=1;i<=n;i++)
{
cout<<k[i]<<" ";
cout<<endl;
}
}
}
}