#include<bits/stdc++.h>
using namespace std;

int main(){
  string S,T,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;
  a="a",b="b",c="c",d="d",e="e",f="f",g="g",h="h",i="i",j="j",k="k",l="l",m="m",n="n",o="o",p="p",q="q",r="r",s="s",t="t",u="u",v="v",w="w",z="z";
  cin >> S >> T;
  if(T == S + a){
    cout << "Yes" << endl;
  }
  else if(T == S + b){
    cout << "Yes" << endl;
  }
  else if(T == S + c){
    cout << "Yes" << endl;
  }
  else if(T == S + d){
    cout << "Yes" << endl;
  }
  else if(T == S + e){
    cout << "Yes" << endl;
  }
  else if(T == S + f){
    cout << "Yes" << endl;
  }
  else if(T == S + g){
    cout << "Yes" << endl;
  }
  else if(T == S + h){
    cout << "Yes" << endl;
  }
  else if(T == S + i){
    cout << "Yes" << endl;
  }
  else if(T == S + j){
    cout << "Yes" << endl;
  }
  else if(T == S + k){
    cout << "Yes" << endl;
  }
  else if(T == S + l){
    cout << "Yes" << endl;
  }
  else if(T == S + m){
    cout << "Yes" << endl;
  }
  else if(T == S + n){
    cout << "Yes" << endl;
  }
  else if(T == S + o){
    cout << "Yes" << endl;
  }
  else if(T == S + p){
    cout << "Yes" << endl;
  }
  else if(T == S + q){
    cout << "Yes" << endl;
  }
  else if(T == S + r){
    cout << "Yes" << endl;
  }
  else if(T == S + s){
    cout << "Yes" << endl;
  }
  else if(T == S + t){
    cout << "Yes" << endl;
  }
  else if(T == S + u){
    cout << "Yes" << endl;
  }
  else if(T == S + v){
    cout << "Yes" << endl;
  }
  else if(T == S + w){
    cout << "Yes" << endl;
  }
  else if(T == S + x){
    cout << "Yes" << endl;
  }
  else if(T == S + y){
    cout << "Yes" << endl;
  }
   else if(T == S + z){
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}
    