import sys
a, b = map(int, input().split())
s = input()
flag = False
for i in range(len(s)):
    if (s[a]) == '-': flag = True
    if (s[not a] == '-'):
      flag = False
      break
print('Yes') if flag else print('No')
