A, B = map(int, input().split())
S = input()
flag = True

for i in S[:A]:
  if i == '-':
    flag = False
if S[A] !='-':
  flag = False
for i in S[A+1:B]:
  if i == '-':
    flag = False
   
if flag:
  print('Yes')
else:
  print('No')
 