a,b=list(map(int,input().split()))

s=eval(input())

print(('Yes' if s[a]=='-' and s.count('-')==1 and len(s)==a+b+1 else 'No'))
a,b=list(map(int,input().split()))

s=eval(input())

if s.count('-')!=1:

	r='No'

else:

	t,u=s.split('-')

	if len(t)==a and len(u)==b and (t+u).isdecimal():

		r='Yes'

	else:

		r='No'

print(r)
a, b = list(map(int, input().split()))
s = eval(input())
print(("Yes" if s[a] == "-" and s.count("-") == 1 and len(s) == a + b + 1 else "No"))

a, b = list(map(int, input().split()))
s = eval(input())
if s.count("-") != 1:
    r = "No"
else:
    t, u = s.split("-")
    if len(t) == a and len(u) == b and (t + u).isdecimal():
        r = "Yes"
    else:
        r = "No"
print(r)

-print(("Yes" if s[a] == "-" and s.count("-") == 1 and len(s) == a + b + 1 else "No")) +if s.count("-") != 1: +    r = "No" +else: +    t, u = s.split("-") +    if len(t) == a and len(u) == b and (t + u).isdecimal(): +        r = "Yes" +    else: +        r = "No" +print(r)