#include <bits/stdc++.h>

using ll = long long;
using namespace std;
const int INFint = 2e9+1;
const ll INFll = 2e18+1;
ll MOD=1e9+7;


int H,W,T;
string s[10];

int main(){
  string s,t;
  cin>>s>>t;
  if(int(s.size()) != int(t.size()) - 1){
    cout << "No" << endl;
    return 0;
  }
  for(int i(0);i<int(s.size());i++){
    if(s[i] != t[i]) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}

