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