char*p,*q;main(s){for(;~scanf("%s%s",p=&s,q=&s+9);puts(*q?"NO":"YES"))for(;*p;q+=(*q=(*q-*p++)%10+48)==48)q-=!*q;}