a,b = map(int,input().split())
s = input()

good = True
for i in range(a):
    if not s[i].isdigit():
        good = False
        break

if good and s[a] == "-":
    for i in range(a+1,b+1):
        if not s[i].isdigit():
            good = False
            break
print("Yes" if good else "No")