#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i=0; i < (int)(n); i++)
using ull = unsigned long long;
using ll = long long;


int main() {
    string S, T;
    cin >> S >> T;

    if (S.size() + 1 == T.size() && S == T.substr(0, S.size())) cout << "Yes" << endl;
    else cout << "No" << endl;
    

    return 0;
}