#include <bits/stdc++.h>

#define     fr              freopen("input.txt","r",stdin)
#define     fw              freopen("output.txt","w",stdout)
#define     fast            ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)


#define     ll              long long int
#define     ld              long double
#define     ul              unsigned long long int
#define     dl              double
#define     st              string

#define     vb              vector<bool>
#define     vll             vector <ll>
#define     lll             list <ll>
#define     ls              list<string>
#define     lc              list <char>
#define     qll             queue <ll>
#define     stll            stack <ll>
#define     sll             set <ll>
#define     sts             set <string>
#define     vs              vector <string>
#define     pll             pair <ll,ll>
#define     mll             map <ll,ll>
#define     msl             map <string,ll>
#define     vecp            vector < pair <ll, ll> >
#define     vecpp           vector < pair <ll, pair <ll, ll> > >
#define     pb              push_back
#define     pf              push_front
#define     in              insert
#define     eb              emplace_back
#define     ppb             pop_back
#define     ppf             pop_front

#define     el              endl
#define     rt              return 0

#define     N               cout << "NO" << endl
#define     Y               cout << "YES" << endl
#define     pr(a)           cout <<a<< endl

#define     gcd(a, b)       __gcd(a, b)
#define     lcm(a, b)       (a * b) / gcd(a, b)

#define     sim             template<class T
#define     len(X)          ((ll)X.size())
#define     mem(a,v)        memset(a,v,sizeof(a))
#define     mp              make_pair
#define     ins             insert
#define     rev             reverse
#define     _max            *max_element
#define     _min            *min_element
#define     SUM             accumulate
#define     BS              binary_search


#define     wh                  while
#define     rep(i, l, r)        for(long long i = l; i<r; i++)
#define     repi(i, l, r, p)    for(long long i = l; i<r; i+=p)
#define     repi2(i, l, r, p)   for(long long i = l; i>=r; i+=p)
#define     repb(i, r, l)       for(long long i = r; i>=l; i--)
#define     repbd(i, r, l, d)   for(long long i = r; i>l; i-=d)
#define     repr(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end))) ///traverse a array!!

#define     max3(a, b, c)       max(a, max(b, c))
#define     max4(a, b, c, d)    max(max(a, b), max(c, d))
#define     min3(a, b, c)       min(a, min(b, c))
#define     min4(a, b, c, d)    min(min(a, b), min(c, d))

#define     vsort(v)            sort(v.begin(),v.end())
#define     all(container)      container.begin(), container.end()
#define     iterate(v, it)      for(vector< long long >::const_iterator it = v.begin(); it != v.end(); it++)

#define     rand(V)             random_shuffle(all(V))
#define     lb(a,X)             lower_bound(all(a),X)-a.begin()
#define     ub(a,X)             upper_bound(all(a),X)-a.begin()

#define     BIG                 300000

#define     BTCL                __builtin_clz ///bit -size
#define     BTFF                __builtin_ffs ///position of 1 from last 1 base
#define     BTCT                __builtin_ctz /// number of zero at last
#define     BTPP                __builtin_popcount /// number of 1 bit

#define     BIG                 300000

using namespace std;


vll input(vll v,ll n){wh(n--) { ll a; cin>>a; v.eb(a);} return v;}
void prnt(vll v){ ll n=v.size(); for(int i=0;i<n;i++)  cout<<v[i]<<" \n"[i==n-1]; }


/// for ( int i = 0 ; i < n ; cin >>w, v.pb(w),i++ )
///for(i = 1; i <= n; i++ , cout << endl)
///   for(j = 1; j <= m; j++)
///      cout << a[i][j] << " ";

ll binsearch(vll v, ll l, ll r, ll no){
    while (l <= r){
        ll mid = (l + r) / 2;
        if (v[mid] == no)
            return mid;
        else if (v[mid] < no)
            l = mid + 1;
        else
            r = mid - 1;
    }
    return -1;
}

/*-----*/

int main()
{

  fast;
    ll a,b;
    st w,y,z;
    cin>>w>>y;
    a=w.size();
    b=y.size();
    if(a+1==b)
    {
        y.erase(y.begin()+b-1);
        if(w==y) pr("Yes");
        else pr("No");
    }
    else pr("No");


    rt;
}



Measured memory_bytes: 3612