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

#define REP(i,s,n) for(int i=s; i<n; ++i)
#define rep(i,n) REP(i,0,n)
#define SORT(c) sort((c).begin(),(c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false

typedef long long ll;
typedef pair<int, int> ii;

int main(){

	string a, b;
	cin >> a >> b;

	for(int i = 0; i + b.size() <= a.size(); ++i){
		string tmp = a.substr(i, b.size());
		bool flag = true;
		for(int j = 0; j < b.size(); ++j){
			flag &= (tmp[j] == b[j] || tmp[j] == '_' || b[j] == '_');
		}

		if(flag){
			cout << "Yes" << endl;
			return 0;
		}
	}

	cout << "No" << endl;

	return 0;
}

