import re
A,B = map(int,input().split())
S = input()


if S.count("-") == 1:
    s1,s2 = S.split("-")
    result = re.match(f"^[0-9]", s1)

    for x in range(2):
        if x == 1:
            result = re.match(f"^[0-9]", s2)
        if result:
            continue
        else:
            print("No")
            sys.exit(0)

    judgment = s1
    n = A
    for x in range(2):
        if x == 1:
            judgment = s2
            n = B
        if len(judgment) == n:
            continue
        else:
            print("No")
            sys.exit(0)

    print("Yes")
else:
    print("No")
