a,b = int(input())
s = input()
l = [str(i) for i in range(10)]
for i in range(a):
    if not s[i] in l:
        print('No')
        exit()
for i in range(b):
    if not s[a+i] in l:
        print('No')
        exit()
if not s[a]=='-':
    print('No')
    exit()
print('Yes')