A,B = map(int, input().split())
S = str(input())
bool = True

if S[A-1] == '-':
    for i in range(A):
        if S[i] == '-':
            bool = False
    
    for j in range(B):
        if S[-i] == '-':
            bool = False
else:
    bool = False
            
print('Yes' if bool else 'No')

