a, b = map(int,input().split())
s = str(input())

def solve(a,b,s):
    v = 0
    for v in range(a):
        if s[v].isdigit() != True:
            return 'NO'
    
    if s[v+1] != '-':
        return 'No'

    for p in range(v+2,a+b+1):
        if s[p].isdigit() != True:
            return 'No'
    
    return 'Yes'

print(solve(a,b,s))