String Transformation
题号:NC52897
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
Special Judge, 64bit IO Format: %lld

题目描述

Bobo has a string consists of letter `a`, `b` and `c`.
He can transform the string by inserting or deleting substrings `aa`, `bb` and `abab`.

Formally, (``'' denotes string concatenation) can be transformed into and vice versa where u, v are (possibly empty) strings and .

Given the target string , determine if Bobo can transform the string S into T.

输入描述:

The input consists of several test cases and is terminated by end-of-file.

The first line of each test case contains a string .
The second line contains a string .

输出描述:

For each test case, print `Yes` if Bobo can. Print `No` otherwise.
示例1

输入

复制
ab
ba
ac
ca
a
ab

输出

复制
Yes
No
No

说明

For the first sample, Bobo can transform as `ab => aababb => babb => ba`.

备注:

* 
*
* The sum of n and m does not exceed 250,000.