A,B=map(int,input().split())
S=input()
num=[str(k) for k in range(1,10)]

for i in range(A):
  if S[i] not in num:
    print('No')
    exit()
    
if S[A]!='-':
  print('No')
  exit()
  
for j in range(A+1,B):
  if S[j] not in num:
    print('No')
    exit()
    
print('Yes')