#include<iostream>
#include<string>
using namespace std;
int main() {
	string s; cin >> s;
	string a, b;
	for (int i = 0; i < s.size(); i++) {
		if (i % 2 == 0)a += s[i];
		else b += s[i];
	}
	string t; cin >> t;
	if (s.size() == 1) { cout << "Yes\n"; return 0; }
	int acnt = 0, bcnt = 0;
	for (int i = 0; i < t.size(); i++) {
		if (a[acnt] == t[i]) {
			acnt++; if (acnt == a.size()) {
				cout << "Yes\n"; return 0;
			}
		}
		if (b[bcnt] == t[i]) {
			bcnt++; if (bcnt == b.size()) {
				cout << "Yes\n"; return 0;
			}
		}
	}
	cout << "No\n";
}