A, B = map(int, input().split())
chars = list(input())
for i in range(A):
    if not chars[i].isdigit():
        print("No")
        exit()
if chars[A] != '-':
    print("No")
    exit()

for i in range(A+1, B):
    if not chars[i].isdigit():
        print("No")
        exit()

print("Yes")

