Limits 1s, 512 MB

Byang is learning how to add numbers. However, he gets confused whenever there is a carry.

To help Byang you need to write a program that will read two integers and determine if Byang will encounter any carry when adding these two numbers.

For example when adding 182 and 243 Byang will encounter a carry:

  182
+ 243
-----
    5 (Carry 0)
  ---
   25 (Carry 1; This will confuse Byang)
  ---
  425 (Carry 0)

On the other hand, when adding 123 and 321 Byang will not encounter any carry, and it will not confuse Byang:

  123
+ 321
-----
    4 (Carry 0)
  ---
   44 (Carry 0)
  ---
  444 (Carry 0)

Input

The input will contain two space-separated integers AA and BB (0A,B<10000000 ≤ A, B < 1000000).

Output

Print "Yes" if adding AA and BB will confuse Byang, otherwise "No".

Samples

InputOutput
182 243
Yes
InputOutput
123 321
No

Submit

Login to submit.

Contributors

Statistics

91% Solution Ratio
fsshakkhorEarliest, Jan '19
fsshakkhorFastest, 0.0s
ReduancsLightest, 0 B
saitotaShortest, 52B
Toph uses cookies. By continuing you agree to our Cookie Policy.