#include<bits/stdc++.h>
using namespace std;

using i64 = int64_t;

int main(){
    string a, b;
    cin >> a >> b;
    bool ok = false;
    for(int i=0;i<=(int)a.size()-(int)b.size();++i){
        bool flag = true;
        for(int j=0;j<(int)b.size();++j){
            if(b[j] != '_' && a[i+j] != b[j]){
                flag = false;
                break;
            }
        }
        if(flag){
            ok = true;
            break;
        }
    }

    cout << (ok ? "Yes" : "No") << endl;

    return 0;
}

