import re,sys

def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))

def S(): return sys.stdin.readline().rstrip()

A,B = LI()

S = S()

print(('Yes' if re.fullmatch(pattern=r'\d{{{}}}-\d{{{}}}'.format(A,B),string=S) else 'No'))

import sys

def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))

def S(): return sys.stdin.readline().rstrip()

A,B = LI()

S = S()

ans = 1

for i in range(A+B+1):

    if i==A:

        if S[i]!='-':

            ans = 0

            break

    else:

        if not S[i] in '1234567890':

            ans = 0

            break

print((['No','Yes'][ans]))

import re, sys


def LI():
    return list(map(int, sys.stdin.readline().rstrip().split()))


def S():
    return sys.stdin.readline().rstrip()


A, B = LI()
S = S()
print(
    (
        "Yes"
        if re.fullmatch(pattern=r"\d{{{}}}-\d{{{}}}".format(A, B), string=S)
        else "No"
    )
)

import sys


def LI():
    return list(map(int, sys.stdin.readline().rstrip().split()))


def S():
    return sys.stdin.readline().rstrip()


A, B = LI()
S = S()
ans = 1
for i in range(A + B + 1):
    if i == A:
        if S[i] != "-":
            ans = 0
            break
    else:
        if not S[i] in "1234567890":
            ans = 0
            break
print((["No", "Yes"][ans]))

-import re, sys +import sys -print( -    ( -        "Yes" -        if re.fullmatch(pattern=r"\d{{{}}}-\d{{{}}}".format(A, B), string=S) -        else "No" -    ) -) +ans = 1 +for i in range(A + B + 1): +    if i == A: +        if S[i] != "-": +            ans = 0 +            break +    else: +        if not S[i] in "1234567890": +            ans = 0 +            break +print((["No", "Yes"][ans]))