#include <iostream>
#include <string>
using namespace std;
int main(){
    std::string S,T;
    cin >> S >> T;
    if(S == T.substr(0,T.length()-1)){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
    return 0;
}
