A, B = map(int, input().split())
S = input()

flag = True

if S[A] != "-":
	flag = False
elif len(S) != A+B+1:
	flag = False

S = S[:A] + S[A+1:]

if not S.isdigit():
	flag = False
else:
	flag = True

print("Yes") if flag == True else print("No")