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 = map(int,input().split())

S = input()

for i in range (A):
  if S[i] == '-':
    print("No")
    exit()
  else:
    continue
for j in range(B,A+B+1):
  if j == B and S[j] != '-':
    print("No")
    exit()
  elif S[j] == '-':
    print("No")
    exit()
    
print("Yes")
A,B = map(int,input().split())

S = input()

for i in range (A):
  if S[i] == '-':
    print("No")
    exit()
  else:
      continue

for j in range(A,A+B+1):
  if j == A and S[j] != '-':
    print("No")
    exit()
  elif j>A and S[j] == '-':
    print("No")
    exit()
  else:
      continue
print("Yes")