#include <iostream>

#define rep(i, n) for (int i=0; i<(n); ++i)

int main() {
    std::string s, t;
    bool f = true;
    std::cin >> s >> t;
    rep(i, s.size()) f &= s[i] == t[i];

    std::cout << (f ? "Yes" : "No") << std::endl;
    return 0;
}
