a, b = map(int, input().split())
c = input()
d = list("1234567890")
for i in range(a):
    if c[i] not in d:
        print("No")
        exit()
if c[a] != "-":
    print("No")
    exit()
for i in range(a+1, b):
    if c[i] not in d:
        print("No")
        exit()
print("Yes")
