# -*- coding: utf-8 -*-
a,b = map(int,input().split())
s = input()

if "-" in s:
    try:
        s1,s2 = s.split("-")
        s1 = int(s1)
        s2 = int(s2)
        s1 = str(s1)
        s2 = str(s2)
        if len(s1) == a and len(s2) == b:
            print("Yes")
        else:
            print("No")
    except:
        print("No")
else:
    print("No")
