A,B=map(int,input().split())
S=input()
ass=True
for i in range(len(S)):
  if i==A-1:
    if S[i]!='-':
      ass=False
      break
  else:
    if S[i]=='-':
      ass=False
      break
if ass:
  print('Yes')
else:
  print('No')