#46105: Yaaaa!!!!


1121228@stu.wghs.tp.edu.tw (你知道我是誰嗎!!??)


#include <bits/stdc++.h>
using namespace std;
 
int main() {
string s, t;
while(cin >> s >> t){
    int pos = 0;
        for(int i=0; i<t.length(); i++){
            if(t[i]==s[pos]){
                pos++;
            }
        }
    cout << (pos==s.length() ? "Yes" : "No") << endl;
}
    return 0;
}