A, B = map(int, input().split())
S = input()
flag = False
for i in range(len(S)):
    if i == A:
        if S[i]=="-":
            flag = True
        else:
            flag = False
    else:
        if S[i]=="-":
            flag = False
print("Yes") if flag else print("No")