def slove():

    import sys

    input = sys.stdin.readline

    a, b = list(map(int, input().rstrip('\n').split()))

    s = str(input().rstrip('\n'))

    ls = list("1234567890")

    for i in range(len(s)):

        if i < a:

            if s[i] not in ls:

                print("No")

                exit()

        elif i == a:

            if s[i] != "-":

                print("No")

                exit()

        elif b <= i:

            if s[i] not in ls:

                print("No")

                exit()

    print("Yes")





if __name__ == '__main__':

    slove()

def slove():

    import sys

    import collections

    input = sys.stdin.readline

    a, b = list(map(int, input().rstrip('\n').split()))

    s = str(input().rstrip('\n'))

    d = collections.defaultdict(int)

    for i in range(10):

        d[str(i)]



    b = True

    for i in range(a + b + 1):

        if i < a:

            if s[i] not in d:

                b = False

                break

        elif i == a:

            if s[i] != "-":

                b = False

                break

        else:

            if s[i] not in d:

                b = False

                break

    if b:

        print("Yes")

    else:

        print("No")





if __name__ == '__main__':

    slove()

def slove():
    import sys

    input = sys.stdin.readline
    a, b = list(map(int, input().rstrip("\n").split()))
    s = str(input().rstrip("\n"))
    ls = list("1234567890")
    for i in range(len(s)):
        if i < a:
            if s[i] not in ls:
                print("No")
                exit()
        elif i == a:
            if s[i] != "-":
                print("No")
                exit()
        elif b <= i:
            if s[i] not in ls:
                print("No")
                exit()
    print("Yes")


if __name__ == "__main__":
    slove()

def slove():
    import sys
    import collections

    input = sys.stdin.readline
    a, b = list(map(int, input().rstrip("\n").split()))
    s = str(input().rstrip("\n"))
    d = collections.defaultdict(int)
    for i in range(10):
        d[str(i)]
    b = True
    for i in range(a + b + 1):
        if i < a:
            if s[i] not in d:
                b = False
                break
        elif i == a:
            if s[i] != "-":
                b = False
                break
        else:
            if s[i] not in d:
                b = False
                break
    if b:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    slove()

+    import collections -    ls = list("1234567890") -    for i in range(len(s)): +    d = collections.defaultdict(int) +    for i in range(10): +        d[str(i)] +    b = True +    for i in range(a + b + 1): -            if s[i] not in ls: -                print("No") -                exit() +            if s[i] not in d: +                b = False +                break -                print("No") -                exit() -        elif b <= i: -            if s[i] not in ls: -                print("No") -                exit() -    print("Yes") +                b = False +                break +        else: +            if s[i] not in d: +                b = False +                break +    if b: +        print("Yes") +    else: +        print("No")