x=[0,1,2,3,4,5,6,7,8,9]
a,b=map(int,input().split())
s=input()
c=0
for i in range(a):
  if s[i] not in x:
    c+=1
if s[a]!="-":
    c+=1
for i in range(a+1,len(s)):
  if s[i] not in x:
    c+=1
if c==0:
  print("Yes")
else:
  print("No")