import sys
a,b=map(int,input().split())
s=input()
s=list(s)

sa=s[:a]
sb=s[a+1:]

for i in range(a):
  if sa[i]=='-':
    print('No')
    sys.exit()
for j in range(b):
  if sb[i]=='-':
    print('No')
    sys.exit()
    
if s[a]!='-':
  print('No')
  sys.exit()
 
print('Yes')
