A,B = map(int, input().split())
S = list(input())
for i in range(A):
    if not 0 <= int(S[i]) <= 9:
        print("No")
        exit()
if S[A] != "-":
    print("No")
    exit()
for i in range(A+1,B):
    if not 0 <= int(S[i]) <= 9:
        print("No")
        exit()
print("Yes")