a, b = map(int, input().split())
s = input()
ans = "Yes"
if s[a] != '-':
    ans = 'No'
for i in range(a):
    if not s[i].isdigit():
        ans = "No"
for i in range(a+1,b):
    if not s[i].isdigit():
        ans = "No"    
print(ans)