#include<iostream>
#include<string>
using namespace std;

int main(){
    string s;
    cin >> s;
    string t;
    cin >> t;

    if(s.size()+1 == t.size()){
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
}