A= int(input())
B = int(input())
S = input()
s1 = S[:A]
s2 = S[A:A+1]
s3= S[len(S)-B:]
if s1.isdigit() == True:
    if s2 == "-":
        if s3.isdigit() == True:
            print("Yes")
        else : 
            print("No")
    else:
        print("No")
else :
    print("No")