#include #define rep(i, n) for (int i = 0; i < n; ++i) using ll = long long; using namespace std; const int INF = 1e9; int main() { string s, t; cin >> s >> t; bool flag = true; if (strncmp(&s[0], &t[0], s.size()) != 0) flag = false; if (flag && t[t.size() - 1] == '0') cout << "Yes"; else cout << "No"; cout << endl; return 0; }