#-*- coding:utf-8 -*-

a, b = map(int, input().split())
s = input()
slist = s.split('-')
if len(slist)==2:
    if slist[0].isdigit() and slist[1].isdigit() and a==len(slist[0]) and b==len(slist[1]):
        print("Yes")
else:
    print("No")
