var

begin
  readln(a,b);
  readln(s);
  if s[a+1]<>'-' then 
  begin
    writeln('No');
    exit;
  end;
  for i:=1 to a+b-1 do
  if i<>a+1 then
    if (s[i]<'0') or (s[i]>'9') then 
    begin
      writeln('No');
      exit;
    end;
  writeln('Yes');
end.