a,b = map(int, input().split())
s = str(input())
list_pre = []
list_post = []
count = 0
while count < a + b + 1:
    if s[count] == "-":
        count += 1
        break
    list_pre.append(s[count])
    count += 1
while count < a + b + 1:
    list_post.append(s[count])
    count += 1
if len(list_pre) == a and len(list_post) == b:
    print("Yes")
else:
    print("No")
