A, B = list(map(int, input().split()))
S = input()

flag = 0

for i in range(len(S)):
    if S[i] == '-':
        if i == A:
            flag = 1
        else:
            flag = 0

if flag == 1:
    print("Yes")
else:
    print("No")
