a,b = map(int,input().split())
s = list(input())
a_lis = s[:(a-1)]
b_lis = s[b:]
if s[a] == "-":
  if "-" not in a_lis:
    if "-" not in b_lis:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")