Removing Pairs

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

The pair removal operation is removing two adjacent characters from a string. For example, given the string "abcd", we can obtain "ab", "ad", and "cd" by pair removal.

You are given a string tt. You can apply pair removal any number of times. Is it possible to obtain the string ss?

입력

The first line contains the string ss, and the second line contains the string tt (1st1051 \le |s| \le |t| \le 10^5). Both strings are composed of lowercase letters of English alphabet.

출력

Print "YES" if it is possible to obtain ss from tt using pair removal, or "NO" otherwise.

힌트

In the first test, one of the possible pair removal sequences is the following:

  • abcbcxdda
  • abcxdda
  • abcxa
  • axa