import math

#n = int(input())
#a = int(input())
a,b = list(map(int,input().split(" ")))
#ls = list(input().split(" "))
#ls = list(map(int,input().split(" ")))
#a,b = list(input().split())
string = input()
#ls = [int(input()) for i in range(n)]
try:
  int(string[0:a])
  int(string[a+1:a+b])
  if string[a] == "-":
    print("Yes")
  else:
    print("No")
except:
  print("No")
