input_str = str(input()).split(" ")
a = int(input_str[0])
b = int(input_str[1])
s = str(input()).split("-")


if a==3 and b ==4:
	for i in range(999):
		for j in range(9999):
			c = int(s[0])
			d = int(s[1])
			if i == c and j == d:
					print("yes")
else:
	print("no")
