#include<iostream>
#include<string>
using namespace std;
int main(){
    string s,t;
    cin >> s >> t;
    string a = "", b = "";
    for(int i = 0; i < s.size(); i++){
        if(i%2) a += s[i];
        else b += s[i];
    }
    int j, k;
    j = k = 0;
    for(int i = 0; i < t.size(); i++){
        if(j < a.size() && t[i] == a[j]) j++;
        if(k < b.size() && t[i] == b[k]) k++;
    }
    if(j == a.size() || k == b.size()){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
}

