A , B = map(int,input().split())
s = input()
l = len(s)
def check(a):
    li = ["0","1","2","3","4","5","6","7","8","9"]
    if li in a:
        return True
    else:
        return False
torf = False
for i in range(A):
    torf = torf and check(s[i])
for i in range(B):
    torf = torf and check(s[i + A])
if torf and l == (A+B+1) and s[A] == "-":
    print("Yes")
else:
    print("No")
