Two text fields were typed into an editor where the character # means backspace: it deletes the single character immediately before it, if any. Pressing backspace on an empty field does nothing. Every other character is a normal lowercase letter typed as-is.
Given the raw keystrokes for two fields, decide whether the two fields display the same final text after all backspaces are applied.
Input format
Line 1: the raw keystrokes of the first field, a string s (possibly empty).
Line 2: the raw keystrokes of the second field, a string t (possibly empty).
Each string contains only lowercase letters a-z and the character #.
Output format
Print YES if the two fields render identical final text, otherwise print NO.
Constraints
- 0 <= length of each string <= 200000
- A
#with no character before it is ignored.