def solve():
    while 1:
        try:
            A, B = list(map(int, input().split(" ")))
            S = list(input())
            if S[A] != "-":
                print("No")
                raise EndLoop

            for a in S[:A]:
                if not 48 <= ord(a) <= 57:
                    print("No")
                    raise EndLoop

            for b in S[B:]:
                if not 48 <= ord(b) <= 57:
                    print("No")
                    raise EndLoop

            print("Yes")
            break

        except:
            break


solve()