a, b = map(int,input().split())
s = list(input())
index = 0
flg = False
if len(s) != a + b + 1:
  flg = True
while(index < a):
  if s[index] == '-':
    flg = True
    break
  index += 1
if s[index] != '-':
  flg = True
while(index < a + 1 + b):
  if s[index] ==  '-':
    flg = True
    break
if flg:
  print("No")
else:
  print("Yes")
  