import re





def actual(a, b, s):

    pattern = r'\d{' + f'{a}' + r'}-\d{' + f'{b}' + '}'

    

    if re.fullmatch(pattern, s):

        return 'Yes'



    return 'No'



a, b = list(map(int, input().split()))

s = eval(input())



print((actual(a, b, s)))
def actual(a, b, s):

    if s[a] != '-':

        return 'No'



    for i in range(0, a):

        if not '0' <= s[i] <= '9':

            return 'No'



    for j in range(a + 1, len(s)):

        if not '0' <= s[j] <= '9':

            return 'No'



    return 'Yes'





a, b = list(map(int, input().split()))

s = eval(input())



print((actual(a, b, s)))

import re


def actual(a, b, s):
    pattern = r"\d{" + f"{a}" + r"}-\d{" + f"{b}" + "}"
    if re.fullmatch(pattern, s):
        return "Yes"
    return "No"


a, b = list(map(int, input().split()))
s = eval(input())
print((actual(a, b, s)))

def actual(a, b, s):
    if s[a] != "-":
        return "No"
    for i in range(0, a):
        if not "0" <= s[i] <= "9":
            return "No"
    for j in range(a + 1, len(s)):
        if not "0" <= s[j] <= "9":
            return "No"
    return "Yes"


a, b = list(map(int, input().split()))
s = eval(input())
print((actual(a, b, s)))

-import re - - -    pattern = r"\d{" + f"{a}" + r"}-\d{" + f"{b}" + "}" -    if re.fullmatch(pattern, s): -        return "Yes" -    return "No" +    if s[a] != "-": +        return "No" +    for i in range(0, a): +        if not "0" <= s[i] <= "9": +            return "No" +    for j in range(a + 1, len(s)): +        if not "0" <= s[j] <= "9": +            return "No" +    return "Yes"