a,b=map(int,input().split())
s=input()
if(s[0:a].isdigit() == True):
    if(s[a] == '-'):
        if(s[a+1:b+1].isdigit() == True):
            print('Yes')
        else:
            print('No')
    else:
        print('No')
        exit()
else:
    print('No')