strnum = [str(i) for i in range(10)]

a, b = input().split()
a, b = int(a), int(b)

S = input()

judge = True
for i in range(a + b + 1):
	if i != a:
		if S[i] in strnum:
			continue
		else:
			judge = False
	else:
		if S[i] == "-":
			continue
		else:
			judge = False
if judge:
	print("Yes")
else:
	print("NO")


