#include <bits/stdc++.h>
using namespace std;
#define ll           long long int
#define ld           long double
#define vi           vector<ll>
#define vvi          vector<vi>
#define vs           vector<string>
#define pb           push_back
#define pf           push_front
#define mp           make_pair
#define fs           first
#define se           second
#define all(x)       (x).begin(), (x).end()
#define rall(x)      (x).rbegin(), (x).rend()
#define fall(x)      (x).begin(),(x).end(),x.begin()
#define fastio       ios_base::sync_with_stdio(false); cin.tie(NULL);
int main()
{
    fastio
    string s,s1,s2=""; cin>>s>>s1;
    for(ll i=0;i<s1.size()-1;i++)
    {
        s2+=s1[i];
    }
    if(s2==s)
    cout<<"Yes";
    else
    cout<<"No";
}