#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef pair<ll,P> PP;
const long long int MOD = 1000000007;
const int INF = 1000000000;

string s,t;

int main(){
    cin >> s >> t;
    for(int i = 0; i < 2; i++){
        int now = 0;
        bool ok = true;
        for(int j = i; j < s.size(); j += 2){
            if(now >= t.size()){
                ok = false;
                break;
            }
            while(t[now] != s[j]){
                now++;
                if(now == t.size()){
                    ok = false;
                    break;
                }
            }
            now++;
            if(!ok) break;
        }
        if(ok){
            cout << "Yes" << endl;
            return 0;
        }
    }
    cout << "No" << endl;
}