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

lst = ['1','2','3','4','5','6','7','8','9']
ans = None

for i in range(a):
    if not s[i] in lst:
        ans = 'No'

if s[a]!='-':
    ans = 'No'

for i in range(a+1,b):
    if not s[i] in lst:
        ans = 'No'

if not ans:
    ans = 'Yes'
print(ans)