The postal code in Atcoder Kingdom is A+B+1 characters long, its (A+1)-th character is a hyphen `-`, and the other characters are digits from `0` through `9`.  You are given a string S. Determine whether it follows the postal code format in Atcoder Kingdom.
A,B=(int(i) for i in input().split())
S=input()
if S[A]=='-':
  for i in range(A):
    if type(S[i])==int:
      for i in range(B):
        if type(S[i+A])==int:
          print("Yes")
        else:
          print("No")
    else:
      print("No")
else:
  print("No")
a,b=(int(i) for i in input().split())
s=input().split('-')
if len(s)!=2:
    print('No')
elif len(s[0])!=a or len(s[1])!=b:
    print('No')
else:
    print('Yes')