#include<cstdio> char*s,*t,q[99],n;int main(){for(;~scanf("%s%s",s=q,t=q+16);n=!puts(*t|n?"NO":"YES"))for(;*s;*t%16-n%10||(n=*t&&!t++))n+=*s++%16;}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page