def is_int(s):

    try:

        int(s)

        return True

    except ValueError:

        return False



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

S = eval(input())

if is_int(S[:A]) and S[A] == '-' and is_int(S[A+1:]):

  print('Yes')

else:

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

S = eval(input())

if not '-' in S[:A]+S[A+1:] and S[A] == '-':

  print('Yes')

else:

  print('No')
def is_int(s):
    try:
        int(s)
        return True
    except ValueError:
        return False


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

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

-def is_int(s): -    try: -        int(s) -        return True -    except ValueError: -        return False - - -if is_int(S[:A]) and S[A] == "-" and is_int(S[A + 1 :]): +if not "-" in S[:A] + S[A + 1 :] and S[A] == "-":