#include <iostream>
using namespace std;
int main() {
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
string s1, s2;
cin >> s1 >> s2;
if (s2.length() == s1.length() + 1) {
int i , j;
while (i < s1.length() && j < s2.length()) {
if (s1[i] != s2[j]) {
cout << "No\n";
return 0;
}
}
cout << "Yes\n";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpIHsKICAgIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oMCk7ICBjaW4udGllKDApOyBjb3V0LnRpZSgwKTsKICAgIAogICAgc3RyaW5nIHMxLCBzMjsKICAgIGNpbiA+PiBzMSA+PiBzMjsKICAgIGlmIChzMi5sZW5ndGgoKSA9PSBzMS5sZW5ndGgoKSArIDEpIHsKICAgICAgICBpbnQgaSAsIGo7CiAgICAgICAgd2hpbGUgKGkgPCBzMS5sZW5ndGgoKSAmJiBqIDwgczIubGVuZ3RoKCkpIHsKICAgICAgICAgICAgaWYgKHMxW2ldICE9IHMyW2pdKSB7CiAgICAgICAgICAgICAgICAgICAgY291dCA8PCAiTm9cbiI7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICAgICAgICB9ICAgIAogICAgICAgIH0KICAgICAgICBjb3V0IDw8ICJZZXNcbiI7CiAgICB9CiAgICAKICAgIHJldHVybiAwOwp9Cg==