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