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

S = eval(input())



if any([S.count("-") != 1, S[0] == "-", S[-1] == "-"]):

  print ("No")

else:

  a, b = S.split("-")

  if len(a) == A and len(b) == B:

    print ("Yes")

  else:

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

S = eval(input())



print(("Yes" if S[A] == "-" and S.count("-") == 1 else "No"))
A, B = list(map(int, input().split()))
S = eval(input())
if any([S.count("-") != 1, S[0] == "-", S[-1] == "-"]):
    print("No")
else:
    a, b = S.split("-")
    if len(a) == A and len(b) == B:
        print("Yes")
    else:
        print("No")

A, B = list(map(int, input().split()))
S = eval(input())
print(("Yes" if S[A] == "-" and S.count("-") == 1 else "No"))

-if any([S.count("-") != 1, S[0] == "-", S[-1] == "-"]): -    print("No") -else: -    a, b = S.split("-") -    if len(a) == A and len(b) == B: -        print("Yes") -    else: -        print("No") +print(("Yes" if S[A] == "-" and S.count("-") == 1 else "No"))