var
  i,a,b:longint;
  s:string;
begin
  readln(a,b);
  readln(s);
  if s[a+1]<>'-' then
   begin
     write('No');
     halt;
   end;
  for i:=1 to a+b+1 do
    begin
      if (i<>a+1) and (not s[i] in['0'..'9']) then
       begin
         write('No');
         halt;
       end;
    end;
  write('Yes');
end.