You are given two strings $s$ and $t$. The string $s$ consists of lowercase Latin letters and at most one wildcard character '*', the string $t$ consists only of lowercase Latin letters. The length of the string $s$ equals $n$, the length of the string $t$ equals $m$.

The wildcard character '*' in the string $s$ (if any) can be replaced with an arbitrary sequence (possibly empty) of lowercase Latin letters. No other character of $s$ can be replaced with anything. If it is possible to replace a wildcard character '*' in $s$ to obtain a string $t$, then the string $t$ matches the pattern $s$.

For example, if $s=$"aba*aba" then the following strings match it "abaaba", "abacaba" and "abazzzaba", but the following strings do not match: "ababa", "abcaaba", "codeforces", "aba1aba", "aba?aba".

If the given string $t$ matches the given string $s$, print "YES", otherwise print "NO".


-----Input-----

The first line contains two integers $n$ and $m$ ($1 \le n, m \le 2 \cdot 10^5$) — the length of the string $s$ and the length of the string $t$, respectively.

The second line contains string $s$ of length $n$, which consists of lowercase Latin letters and at most one wildcard character '*'.

The third line contains string $t$ of length $m$, which consists only of lowercase Latin letters.


-----Output-----

Print "YES" (without quotes), if you can obtain the string $t$ from the string $s$. Otherwise print "NO" (without quotes).


-----Examples-----
Input
6 10
code*s
codeforces

Output
YES

Input
6 5
vk*cup
vkcup

Output
YES

Input
1 1
v
k

Output
NO

Input
9 6
gfgf*gfgf
gfgfgf

Output
NO



-----Note-----

In the first example a wildcard character '*' can be replaced with a string "force". So the string $s$ after this replacement is "codeforces" and the answer is "YES".

In the second example a wildcard character '*' can be replaced with an empty string. So the string $s$ after this replacement is "vkcup" and the answer is "YES".

There is no wildcard character '*' in the third example and the strings "v" and "k" are different so the answer is "NO".

In the fourth example there is no such replacement of a wildcard character '*' that you can obtain the string $t$ so the answer is "NO".

Difficulty: competition

Starter code:

Solutions:
#!/usr/bin/env python3
def solve(n, m, s, t):
    if '*' in s:
        l, r = s.split('*')
        return len(l) + len(r) <= len(t) and t.startswith(l) and t.endswith(r)
    else:
        return s == t

n, m = list(map(int, input().split()))
s = input()
t = input()
print(['NO', 'YES'][solve(n, m, s, t)])


input()
a = input()
b = input()

if '*' in a:
    x, y = a.split('*')
    if b.startswith(x) and b.endswith(y) and len(b) >= (len(x) + len(y)):
        print('YES')
    else:
        print('NO')
else:
    print('YES' if a == b else 'NO')


n, m = list(map(int, input().split()))
s = input()
t = input()

if '*' in s:
    a, b = s.split('*')
    if len(a) + len(b) <= len(t) and t.startswith(a) and t.endswith(b):
        print("YES")
    else:
        print("NO")
else:
    if s == t:
        print("YES")
    else:
        print("NO")


def ii():
    return int(input())
def mi():
    return map(int, input().split())
def li():
    return list(mi())

n, m = mi()
s = input().strip()
t = input().strip()
ok = 0
if '*' not in s:
    ok = s == t
else:
    i = s.index('*')
    l = s[:i]
    r = s[i+1:]
    if t.startswith(l):
        t = t[i:]
        if t.endswith(r):
            ok = 1
print('YES' if ok else 'NO')

def solve(s,t):
    ss=s.split('*')
    if len(ss)==1:
        return ss[0]==t
    else:
        return t.startswith(ss[0]) and t.endswith(ss[1]) and len(t)>=len(s)-1

input()
s=input()
t=input()
if solve(s,t):
    print("YES")
else:
    print("NO")

n, m = list(map(int, input().split()))
s = input()
t = input()
k = s.find("*")
if k == -1 or n > m + 1:
    if s == t:
        print("YES")
    else:
        print("NO")
else:
    if s[:k] == t[:k] and s[k+1:] == t[m - (n - k - 1):]:
        print("YES")
    else:
        print("NO")


input()
s = input()
t = input()
if s.count('*'):
  for i in range(len(s)):
    if s[i] == '*':
      print('YES' if s[0:i] == t[0:i] and s[i + 1:] == t[len(t) - len(s[i + 1:]):] and i <= len(t) - len(s[i + 1:]) else 'NO')
      return
else:
  print('YES' if s == t else 'NO')


n,m=list(map(int,input().strip().split()))
r=input()
s=input()
if "*" not in r:
	if r==s:
		print ("YES")
	else:
		print ("NO")
	return
r1,r2=r.split("*")
if len(s)<(len(r1)+len(r2)):
	print ("NO")
else:
	l1=len(r1)
	l2=len(r2)
	if s[0:l1]==r1 and s[len(s)-l2:]==r2:
		print ("YES")
	else:
		print ("NO")




n, m = list(map(int, input().split()))
s = input()
t = input()

if '*' not in s:
	if s == t:
		print('YES')
	else:
		print('NO')
else:
	a = s.split('*')
	if len(t) >= len(s) - 1 and t[:len(a[0])] == a[0] and (len(a[1]) == 0 or t[-len(a[1]):] == a[1]):
		print('YES')
	else:
		print('NO')


n,m = list(map(int,input().split()))
s = input()
t = input()
x = s.find('*')
if(s==t):
    print('YES')
elif(x==-1):
    print('NO')
elif(n-1>m):
    print('NO')
else:
    if(s[:x]==t[:x]):
        z = s[x+1:]
        z = z[::-1]
        p = t[::-1]
        p = p[:len(z)]
        if(p==z):
            print('YES')
        else:
            print('NO')
    else:
        print('NO')


n, m = map(int, input().split())
s = input()
t = input()
if len(s) - 1 > m:
    print('NO')
elif s == '*':
    print('YES')
elif '*' not in s:
    if s == t:
        print('YES')
    else:
        print('NO')
else:
    for i in range(len(s)):
        if s[i] == '*':
            pos = i
            break
    if s[0 : pos] == t[0 : pos] and s[pos + 1:] == t[m - (n - pos) + 1:]:
        print('YES')
    else:
        print('NO')

n = input()
s = input()
t = input()
p = s.find('*')
if (p == -1):
	if (s == t):
		print("YES")
	else:
		print("NO")
	return
sl = len(s) - p - 1
if (s[:p] == t[:p] and t[len(t) - sl:] == s[p + 1:] and len(t) >= len(s) - 1):
	print("YES")
else:
	print("NO")

N, M = list(map(int, input().split()))
S = input().split('*')
T = input()

if (len(S) == 1):
  print("YES" if S[0] == T else "NO")
else:
  print("YES" if S[0] == T[:len(S[0])] and S[1] == T[len(T) - len(S[1]):] and len(S[0]) + len(S[1]) <= len(T) else "NO")


n, m = list(map(int, input().split()))
s = input()
t = input()
if '*' not in s:
    print('YES' if s == t else 'NO')
else:
    i = s.index('*')
    print('YES' if i <= m and s[:i] == t[:i] and n - 1 - i <= m - i and s[i + 1:] == t[m - (n - i - 1):] else 'NO')


input()
s=input()
t=input()
if "*" not in s:
    print("YES" if s==t else "NO")
else:
    l,r=s.split("*")
    if t.startswith(l) and t.endswith(r) and len(l) + len(r) <= len(t):
        print("YES")
    else:
        print("NO")

input()
s = input()
t = input()

s = ' ' + s + ' '
t = ' ' + t + ' '

if '*' in s:
	idx = s.find('*')
	prefix, suffix = s[:idx], s[idx+1:]
	print('YES' if len(s)-1 <= len(t) and prefix == t[:len(prefix)] and suffix == t[-len(suffix):] else 'NO')
else:
	print('YES' if s == t else 'NO')

n, m = map(int, input().split())
s = input()
t = input()
if '*' not in s:
    if s == t:
        print('YES')
    else:
        print('NO')
    return
ind = s.find('*')
if s[:ind] == t[:ind] and s[ind + 1:] == t[m - n + ind + 1:] and m - n + ind + 1 >= ind:
    print('YES')
else:
    print('NO')

USE_STDIO = False

if not USE_STDIO:
    try: import mypc
    except: pass

def main():
    n, m = list(map(int, input().split(' ')))
    s = input()
    t = input()

    i = s.find('*')
    if i < 0: return s == t
    return len(t) >= len(s) - 1 and s[:i] == t[:i] and s[i+1:] == t[len(t)-len(s)+i+1:]

def __starting_point():
    print(['NO', 'YES'][main()])




__starting_point()

n, m = map(int, input().split())
s, t = input(), input()
if '*' not in s:
    if s == t:
        print("YES")
    else:
        print("NO")
    return
s1 = s[:s.find('*')]
s2 = s[s.find('*') + 1:]
if t[:len(s1)] == s1 and t[len(t) - len(s2):] == s2 and len(s1) + len(s2) <= len(t):
    print("YES")
else:
    print("NO")

n, m = [int(x) for x in input().split()]
a = input()
b = input()
if "*" not in a:
    if a == b:
        print("YES")
    else:
        print("NO")
else:
    part1,part2 = a.split("*")
    if b.startswith(part1) and b.endswith(part2) and len(part1)+len(part2)<=len(b):
        print("YES")
    else: 
        print("NO")

n, m = (int(x) for x in input().split())
a = input()
b = input()
if '*' not in a:
    if a == b:
        print('YES')
    else:
        print('NO')
    quit()
l, r = a.split('*')
if len(b) >= len(a) - 1:
    if l == b[:len(l)] and r == b[len(b) - len(r):]:
        print('YES')
    else:
        print('NO')
else:
    print('NO')


# from math import ceil
#from sys import stdout

t = 1#int(input())
for test in range(1,t+1):
    n,m = (list(map(int, input().split())))
    s = input()
    t = input()
    if n-m>1:
    	print("NO")
    	continue
    tmp = s.find('*')
    if tmp == -1:
    	if s==t:
    		print("YES")
    	else:
    		print("NO")
    else:
    	if s[:tmp]==t[:tmp] and s[tmp+1:]==t[m-(n-tmp-1):]:
    		print("YES")
    	else:
    		print("NO")


n, m = map(int,input().split())
s = input()
t = input()
index = s.find('*')
if n-m>1:
    print('NO')
else:
#print(s[:index],t[:index])
#print(s[index+1:],t[m-len(s[index+1:]):])
    if s[:index] == t[:index] and s[index+1:] == t[m-len(s[index+1:]):]:
        print('YES')
    else:
        print('NO')

n,m=list(map(int,input().split()))
s=input()
t=input()
def f():
    if "*" not in s:
        return s==t
    if n-1>m:
        return False
    x=s.find("*")
    return s[:x]==t[:x] and s[x+1:]==t[m-(n-1-x):]
if f():
    print("YES")
else:
    print("NO")


n,m=map(int,input().split())
s=input()
t=input()
k=-1
for i in range(n):
    if s[i]=='*':
        k=i
        break
if s[0:i]==t[0:i] and s[i+1:n]==t[m-n+i+1:m]:
    if (k==-1 and s!=t) or (n>m+1):
        print('NO')
    else:
        print('YES')
else:
    print('NO')