a,b = list(map(int,input().split()))
s = input()
ans = s[a:b]


if len(s) == a+b+1:
    if ans == '-':
        if s.count("-") == 1:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")
