#include int main(void) { char a[11],b[11],i; short an,bn; scanf("%s",a); scanf("%s",b); an = 0; bn = 0; for (i=0;i<11;i++) { if (a[i]=='\0' || b[i]=='\0') break; an += a[i]; bn += b[i]; } if (an==bn) printf("YES\n"); else printf("NO\n"); return 0; }