#!/usr/bin/python

import re
import sys

def main(argv):
    line = sys.stdin.readline()
    while line:
        A, B = map(lambda x: int(x), line.rstrip("\n").split(" "))
        S = sys.stdin.readline().rstrip("\n")
        pattern = "\d{{{0}}}-\d{{{1}}}$".format(A, B)
        if re.match(pattern, S):
            print "Yes"
        else:
            print "No"

        line = sys.stdin.readline()

if __name__ == "__main__":
    main(sys.argv)