A, B = list(map(int,input().split()))

S = eval(input())

v = 0

if len(S) != A + B + 1:

    v = 1

for i in range(len(S)):

    if i!= A and S[i] not in [str(j) for j in range(10)]:

        v = 1

    if i == A and S[i] != '-':

        v = 1

if v == 1:

    print("No")

else:

    print("Yes")





            

A, B = list(map(int,input().split()))

S = eval(input())

if len(S) == A + B + 1:

    cnt = 0

    for x in S:

        if  x == '-':

            cnt += 1

    if cnt == 1 and S[A] == '-':

        print("Yes")

        quit()

print("No")

A, B = list(map(int, input().split()))
S = eval(input())
v = 0
if len(S) != A + B + 1:
    v = 1
for i in range(len(S)):
    if i != A and S[i] not in [str(j) for j in range(10)]:
        v = 1
    if i == A and S[i] != "-":
        v = 1
if v == 1:
    print("No")
else:
    print("Yes")

A, B = list(map(int, input().split()))
S = eval(input())
if len(S) == A + B + 1:
    cnt = 0
    for x in S:
        if x == "-":
            cnt += 1
    if cnt == 1 and S[A] == "-":
        print("Yes")
        quit()
print("No")

-v = 0 -if len(S) != A + B + 1: -    v = 1 -for i in range(len(S)): -    if i != A and S[i] not in [str(j) for j in range(10)]: -        v = 1 -    if i == A and S[i] != "-": -        v = 1 -if v == 1: -    print("No") -else: -    print("Yes") +if len(S) == A + B + 1: +    cnt = 0 +    for x in S: +        if x == "-": +            cnt += 1 +    if cnt == 1 and S[A] == "-": +        print("Yes") +        quit() +print("No")