import sys
a,b = map(int,input().split())
s = list(input())
print(s)
if s[a] != "-":
	print("No")
	sys.exit()
s[s.index("-")] = "1"
for i in range(len(s)):
	if s[i].isdigit():
		if int(s[i]) >= 6 or int(s[i]) <= 0:
			print("No")
			sys.exit()
	else:
		print("No")
		sys.exit()
print("Yes")