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