#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int n,sum=0;
int t=n;
if(n<9){
printf("Number should be greater than 9"); }
while(n!=0){
int num=n%10;
sum+=num;
n=n/10;
}
if((sum%9)==0){
printf("%d is magic number for 9",t
); }
else
printf("%d is not a magic number for 9",t
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KI2luY2x1ZGUgPG1hdGguaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgoKaW50IG1haW4oKSB7CgogICAgLyogRW50ZXIgeW91ciBjb2RlIGhlcmUuIFJlYWQgaW5wdXQgZnJvbSBTVERJTi4gUHJpbnQgb3V0cHV0IHRvIFNURE9VVCAqLwogICAgaW50IG4sc3VtPTA7CiAgICBzY2FuZigiJWQiLCZuKTsKICAgIGludCB0PW47CiAgICBpZihuPDkpewogICAgICAgIHByaW50ZigiTnVtYmVyIHNob3VsZCBiZSBncmVhdGVyIHRoYW4gOSIpOwogICAgICAgIGV4aXQoMCk7CiAgICB9CiAgICB3aGlsZShuIT0wKXsKICAgICAgICBpbnQgbnVtPW4lMTA7CiAgICAgICAgc3VtKz1udW07CiAgICAgICAgbj1uLzEwOwogICAgICAgIAogICAgfQogICAgCiAgICBpZigoc3VtJTkpPT0wKXsKICAgICAgICBwcmludGYoIiVkIGlzIG1hZ2ljIG51bWJlciBmb3IgOSIsdCk7CiAgICB9CiAgICBlbHNlCiAgICAgICAgcHJpbnRmKCIlZCBpcyBub3QgYSBtYWdpYyBudW1iZXIgZm9yIDkiLHQpOwoKICAgIHJldHVybiAwOwp9Cg==