시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 (추가 시간 없음) 512 MB35222262.857%

문제

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 $t$. You can apply pair removal any number of times. Is it possible to obtain the string $s$?

입력

The first line contains the string $s$, and the second line contains the string $t$ ($1 \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 $s$ from $t$ using pair removal, or "NO" otherwise.

예제 입력 1

axa
abcbcxdda

예제 출력 1

YES

예제 입력 2

rrr
rdfgdfgrdr

예제 출력 2

NO

예제 입력 3

w
uwwu

예제 출력 3

NO

노트

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

  • abcbcxdda
  • abcxdda
  • abcxa
  • axa