https://ide.codingblocks.com/#/s/13964
https://hack.codingblocks.com/contests/c/452/1103
#include
using namespace std;
int main() {
unsigned long long int n,dsum=0,psum=0,i,temp;
cin>>n;
temp=n;
while(temp>0){
dsum=dsum+temp%10;
temp=temp/10;
}
while(n%2==0){
n=n/2;
psum=psum+2;
}
temp=n;
for(i=3;i*i<=temp;i=i+2){
while((n%i==0) && (n>1)){
psum=psum+i;
n=n/i;
}
if(n<2)
break;
}
if(dsum==psum)
cout<<"1";
else
cout<<"0";
return 0;
}