#include <bits/stdc++.h>
using namespace std;

string S,T; int n,now,ok,nxt;
vector<int> pos[26];

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> S >> T; n=S.size();
    for (int i=0;i<n;++i){
        pos[T[i]-'a'].emplace_back(i);
    }
    for (int s=0;s<2;++s){
        now=-1,ok=1;
        for (int i=s;i<n;i+=2){
            nxt=S[i]-'a';
            auto itr=upper_bound(pos[nxt].begin(),pos[nxt].end(),now);
            if (itr==pos[nxt].end()){ok=0; break;}
            now=*itr;
        }
        if (ok){cout << "Yes" << '\n'; return 0;}
    }
    cout << "No" << '\n';
}

### Prompt

Please provide a Cpp coded solution to the problem described below:

Example

Input

acmicpc
tsukuba


Output

No

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;

string S,T; int n,now,ok,nxt;
vector<int> pos[26];

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> S >> T; n=S.size();
    for (int i=0;i<n;++i){
        pos[T[i]-'a'].emplace_back(i);
    }
    for (int s=0;s<2;++s){
        now=-1,ok=1;
        for (int i=s;i<n;i+=2){
            nxt=S[i]-'a';
            auto itr=upper_bound(pos[nxt].begin(),pos[nxt].end(),now);
            if (itr==pos[nxt].end()){ok=0; break;}
            now=*itr;
        }
        if (ok){cout << "Yes" << '\n'; return 0;}
    }
    cout << "No" << '\n';
}

```