input = readlines
a, b = input[0].chomp, input[1].chomp
a_len = a.length
b_len = b.length
match = false
(a_len - b_len + 1).times do |i|
  substr = a[i, b_len]
  match_count = substr.chars.each_with_index.inject(0) do |sum, (ac, i)|
    break sum unless b[i] == '_' || ac == b[i]
    sum += 1
  end
  if match_count == b_len
    match = true
    break
  end
end
puts match ? 'Yes' : 'No'
