from pprint import pprint as pp
def GI(): return int(raw_input())
def GIS(): return map(int, raw_input().split())

def main():
  A, B = GIS()
  S = raw_input()
  print('Yes' if S[A] == '-' and all(map(str.isdigit, (S[:A], S[A+1:]))) else 'No')

main()