#include
#include
void main()
{
int i,n,a,Sn;
for(n=2;n<=1000;n++)
{
a=sqrt(n);
for(Sn=0,i=1;i
Sn=Sn+i;
}
if(Sn==n)
printf("%d its factors are ",n);
else
continue;
Sn = 0;
for(i=1;i
if(n%i==0){
Sn += i;
if(Sn == n){
printf("%d", i);
}else{
printf("%d,",i);
}
}
}
printf("\n");
}
}