LearnPy Hub
← Arena
EasyRating 1000

Backspace Strings

In each string, # means backspace. Print YES if the two strings end up equal.

Input

Two lines.

Output

YES or NO.

Sample 1

Input
ab#c
ad#c
Output
YES

Sample 2

Input
ab##
c#d#
Output
YES
solution.py
Output appears here
Backspace Strings · Python Arena problem · LearnPy Hub