#include<iostream>
#include<vector>
#include<algorithm>
#include<utility>
#include<string>
#include<cmath>
#include<cstring>
#include<queue>
#include<map>
#include<climits>
#include<set>

using namespace std;
typedef pair<int, int> pii;
typedef long long int ll;
typedef pair<ll, ll> pll;
int dx[4] = { 1,0,0,-1 };
int dy[4] = { 0,1,-1,0 };

#define ARRAY_MAX 100005

const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;



//約数の列挙
vector<ll> divisor(ll n) {
	vector<ll> res;
	for (ll i = 1; i * i <= n; i++) {
		if (n % i == 0) {
			res.push_back(i);
			if (i != n / i) {
				res.push_back(n / i);
			}
		}
	}
	return res;
}

int main() {


	ios::sync_with_stdio(false);
	cin.tie(0);
	
	string s, t;
	cin >> s >> t;

	int s_len = s.size();
	int t_len = t.size();

	for (int i = 0; i <= s_len - t_len; i++)
	{
		bool exist = true;
		for (int j = i; j < i + t_len; j++)
		{
			if (t[j - i] == '_')
			{
				continue;
			}

			if (t[j - i] != s[j])
			{
				exist = false;
				break;
			}
		}
		if (exist)
		{
			cout << "Yes" << endl;
			return 0;
		}
	}

	cout << "No" << endl;


	return 0;
}
