a,b=map(int,input().split())
hoge=input()
flag1=0
flag2=1
flag3=0
for i in range(a+b+1):
  if(hoge[i]=="-" and i<a):
    flag1=1
  if(hoge[i]=="-" and i==a):
    flag2=0
  if(hoge[i]=="-" and i>a):
    flag3=1

if(flag1==0,flag2==0,flag3==0):
  print("Yes")
else:
  print("No")