a, b = map(int, input().split())
s = input()
x=0
if s[a+1-1]=='-':
    for i in s:
        if i not in ('0','1','2','3','4','5','6','7','8','9','-'):
            x=0
            break
        else:
            x=1
else:
    x=0
if x==0:
    print('No')
elif x==1:
    print('Yes')