#!/usr/bin/env python3

# coding=utf-8



import sys

import re



a, b = sys.stdin.readline().strip().split(" ")

s = sys.stdin.readline().strip()

a = int(a)

b = int(b)

m = re.match(r'(\d+)(-)(\d+)', s)

if m is None:

    print("No")

else:

    if len(m.group(1)) == a and m.group(2) == "-" and len(m.group(3)) == b:

        print("Yes")

    else:

        print("No")

def solve(string):

    a, b, s = string.split()

    a = int(a)

    return "Yes" if s[a] == "-" and (s[:a] + s[a + 1:]).isdigit() else "No"





if __name__ == '__main__':

    print((solve('\n'.join([eval(input()), eval(input())]))))

#!/usr/bin/env python3
# coding=utf-8
import sys
import re

a, b = sys.stdin.readline().strip().split(" ")
s = sys.stdin.readline().strip()
a = int(a)
b = int(b)
m = re.match(r"(\d+)(-)(\d+)", s)
if m is None:
    print("No")
else:
    if len(m.group(1)) == a and m.group(2) == "-" and len(m.group(3)) == b:
        print("Yes")
    else:
        print("No")

def solve(string):
    a, b, s = string.split()
    a = int(a)
    return "Yes" if s[a] == "-" and (s[:a] + s[a + 1 :]).isdigit() else "No"


if __name__ == "__main__":
    print((solve("\n".join([eval(input()), eval(input())]))))

-#!/usr/bin/env python3 -# coding=utf-8 -import sys -import re +def solve(string): +    a, b, s = string.split() +    a = int(a) +    return "Yes" if s[a] == "-" and (s[:a] + s[a + 1 :]).isdigit() else "No" -a, b = sys.stdin.readline().strip().split(" ") -s = sys.stdin.readline().strip() -a = int(a) -b = int(b) -m = re.match(r"(\d+)(-)(\d+)", s) -if m is None: -    print("No") -else: -    if len(m.group(1)) == a and m.group(2) == "-" and len(m.group(3)) == b: -        print("Yes") -    else: -        print("No") + +if __name__ == "__main__": +    print((solve("\n".join([eval(input()), eval(input())]))))