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