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