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

s = eval(input())

print(('Yes' if len(s) == a + b + 1 and

      s[a] == '-' and all(i in '0123456789' for i in s[:a]+s[a+1:]) else 'No'))

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

s = eval(input())

print(('Yes' if s.count('-') == 1 and s[a] == '-' else 'No'))

a, b = list(map(int, input().split()))
s = eval(input())
print(
    (
        "Yes"
        if len(s) == a + b + 1
        and s[a] == "-"
        and all(i in "0123456789" for i in s[:a] + s[a + 1 :])
        else "No"
    )
)

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

-print( -    ( -        "Yes" -        if len(s) == a + b + 1 -        and s[a] == "-" -        and all(i in "0123456789" for i in s[:a] + s[a + 1 :]) -        else "No" -    ) -) +print(("Yes" if s.count("-") == 1 and s[a] == "-" else "No"))