a, b = map(int, input().split())
s = input()
ok = True
for i in range(a):
    if s[i] == '-': ok = False
if s[a] != '-': ok = False
for i in range(a + 1, b):
    if s[i] == '-': ok = False
if ok: print('Yes')
else: print('No')
