#coding: utf-8
import re
A,B = map(int,input().split())
S = input()
find_underscore = re.findall("-",S[A])
find_num_a = re.findall("[0-9]",S[:A-1])
find_num_b = re.findall("[0-9]",S[A+1:])
if find_underscore and find_num_a and find_num_b:
    print("Yes")
else:
    print("No")