import re

A,B=list(map(int,input().split()));S=eval(input())

print(('Yes' if 1<=A<=5 and 1<=B<=5 and S[:A].isdigit() and S[A]=='-' and S[B+1:].isdigit() else 'No'))
A,B=list(map(int,input().split()));S=eval(input())

print(('Yes' if S[:A].isdigit() and S[A]=='-' and S[B+1:].isdigit() else 'No'))
import re

A, B = list(map(int, input().split()))
S = eval(input())
print(
    (
        "Yes"
        if 1 <= A <= 5
        and 1 <= B <= 5
        and S[:A].isdigit()
        and S[A] == "-"
        and S[B + 1 :].isdigit()
        else "No"
    )
)

A, B = list(map(int, input().split()))
S = eval(input())
print(("Yes" if S[:A].isdigit() and S[A] == "-" and S[B + 1 :].isdigit() else "No"))

-import re - -print( -    ( -        "Yes" -        if 1 <= A <= 5 -        and 1 <= B <= 5 -        and S[:A].isdigit() -        and S[A] == "-" -        and S[B + 1 :].isdigit() -        else "No" -    ) -) +print(("Yes" if S[:A].isdigit() and S[A] == "-" and S[B + 1 :].isdigit() else "No"))