a,b = map(int, input().split())
s = list(input())
if len(s)==a+b+1:
    if not '-' in s[:a]:
        if not '-' in s[b:]:
            if s[a]=='-':
                print('Yes')
                exit()
print('No')