#include<iostream.h>
int main()
{
int x,sum,a;
for(x=1;x<1000;x++)
sum=0;
for(a=1;a<x;a++)
if(x%a==0)
sum=sum+a;
}
if(sum==x)
cout<<x<<" its factors are ";
cout<<a<<',';
cout<<'\n';
return 0;