A, B = map(int, input().split())
S = input()
i = S.find("-")
if i == -1:
    print("No")
    exit()

s = list(S)
if not(i == A):
    print("No")
    exit()
if not(len(s)-(i+1) == B):
    print("No")
    exit()

print("Yes")
