char*p,t[2d5];ll d,s,c;{rd(p=t,d);for(;*p;++p)*p<63?s+=*p-48:++c;wt(d?s=(Mint(10)**c-1)/9+(s&&s%9==d%9):!s);}