a, b = map(int, input().split())
s = input()
for i in range(len(s)):
    if s[i] == "-":
        if i == a and len(s)-i-1 == b:
            print("Yes")
            break
        else:
            print("No")
            break