a,b = map(int,input().split())
stg = input()
res = "Yes"
for i in range(a):
  if not stg[i].isdigit():
    res = "No"
if not stg[a]=='-':
  res = "No"
for i in range(a+1,b+1):
  if not stg[i].isdigit():
    res = "No"
print(res)