#include <bits/stdc++.h>
using namespace std;
int main() {
	string x;
	string n;
	cin >> x >> n;
	n.pop_back();
	if (n == x) {
		cout << "true" << "\n";
		return true;
	} else {
		cout << "false" << "\n";
	}
}
