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