#include<bits/stdc++.h>
using namespace std;
int main(){
    long long a,b=1,c,d[100000001],e=0,f,i,g[100000001],h=100000000000,j,m,n,z,x=1,k=0,y=1,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16,y17,y18,y19,y20,y21,y22,y23,y24,y25,x1;
    string s,s1,s2="Yes";
    cin>>s>>s1;
    for(i=0;i<s.size();i++){
        if(s[i]!=s1[i]){
            s2="No";
            break;
        }
    }
    cout<<s2;
}