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