#include <iostream>
#include <string>

using namespace std;

typedef long long ll;

int main()
{
    string s, t;
    cin >> s >> t;
    bool flag = true;
    for (int i = 0; i < s.length; s++)
    {
        if (s[i] != t[i])
        {
            flag = false;
            break;
        }
    }
    cout << flag ? "Yes" : "No" << endl;
    return 0;
}