def main():
  a, b = map(int, input().split())
  s = input()
  for i in range(1, len(s)+1):
    if i == a+1:
      if s[i] != '-':
       	return False
    else:
      if s[i] == '-':
        return False
  return True

if __name__ == '__main__':
  if main():
    print('Yes')
  else:
    print('No')