407684: GYM102873 D Sanda's Job
Description
Sanda's father has a number $$$a$$$.
One day her father wanted to obtain another number $$$s$$$ and asked Sanda for help.
But Sanda only knows one operation, she can rearrange the digits of a given number $$$a$$$ (she can't construct a number with leading zeroes).
Sanda now wants to know if she can write the desired number $$$s$$$ as the sum of the father's original number $$$a$$$ and a rearrangement of it (the rearrangement can be equal to the original number).
In other words, you have to check if there exists a number $$$b$$$ which is obtained by reordering the digits from the initial number $$$a$$$ such that $$$a + b = s$$$.
Help Sanda determine if she can be successful, print "YES" if she can do the job, else print "NO".
InputThe first (and only) line contains positive integers $$$a$$$ and $$$s$$$ $$$(1 \leq a, s \leq 10^{15})$$$.
OutputPrint "YES" if she can do the job, else print "NO".
ExamplesInput1000 1001Output
NOInput
123 255Output
YESInput
100 200Output
YESNote
In the first sample, it is impossible to find any permutation that fits the requirement.
In the second sample, a possible permutation of digits of the number $$$123$$$ is $$$132$$$ Adding them up together we obtain $$$255$$$ - the required sum, so there exists at least a solution