a, b=[int(i) for i in input().split()]
s=input()
#print(a, b, s)

flag=1

if s.count('-') < 1 or  s.count('-') > 1:
  flag=0
else:
  s1, s2=[int(i) for i in s.split('-')]
#print(s1,s2)
  if s1>=10**a or s2 < 10**(b-1):
    flag=0

print('Yes' if flag==1 else 'No') 