The postal code in Atcoder Kingdom is A+B+1 characters long, its (A+1)-th character is a hyphen `-`, and the other characters are digits from `0` through `9`.  You are given a string S. Determine whether it follows the postal code format in Atcoder Kingdom.
A,B=map(int,input().strip().split(" "))
S=input()

for i in range(A):
    if(S[i]!=(0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9)):
        print("No")
        quit()
for i in range(A+1,A+B+1):
    if(S[i]!=(0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9)):
        print("No")
        quit()
        

if(len(S)==A+B+1 and S[A]=='-' ):
    print("Yes")
else:
    print("No")

A,B=map(int,input().strip().split(" "))
S=list(input())
flag=0

if(S[A]=='-'):
    S.pop(A)
else:
    flag=1

if('-' in S):
    flag=1

if(flag==0):
    print("Yes")
else:
    print("No")

