
a,b = map(int,input().split())
s = list(input())
num = [0,1,2,3,4,5,6,7,8,9]
status = False

if s[a] != "-":
    print("No")
    exit()
else:
    for i in range(len(s)):
        if i == a:
            pass
        else:
            if s[i] not in num:
                print("No")
                exit()

print("Yes")
