main(k,s){char*p,*q;for(;~scanf("%s%s",p=s,q=s+30);puts(*p|*q?"NO":"YES"))for(;*p>9;k+48-*q?*p+=k:q++)k=*p++%48%10;}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page