#include <bits/stdc++.h>
#define ll long long
#define fastIO cout << fixed << setprecision(12), ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
using namespace std;

int main() {
	fastIO;
#ifdef LOCAL
			freopen("input.in", "rt", stdin);
#endif
	string a, b;
	cin >> a >> b;
	b.pop_back();
	if(a == b) {
		cout << "Yes";
	} else {
		cout << "No";
	}
	return 0;
}
