#B Postal Code
a , b = map(int,input().split())
c = input()
d = len(c)
e = 0
for i in c:
    if i !="-" and i !=i:
        e += 1
if a+b+1 == d and c[a] =="-" and e==d:
    print("Yes")
else:
    print("No")