A, B = map(int, input().split())
S = input()
haihun = False
number = True

if S[A] == "-":
    haihun = True

for i in S[A+1:]:
    if i == "-":
        number = False
        break
    if int(i) < 0 or int(i) > 9:
        number = False
        break
    else:
        continue


if haihun and number:
    print("Yes")
else:
    print("No")
