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