import re
a, b = map(int, input().split())
s = input()

if len(s) != a + b+ 1:
	print ("No")
	exit()

if re.search('\d{3}',s[:a]) and s[a] == "-" and re.search('\d{4}',s[a+1:]):
	print ("Yes")
else:
	print ("No")
