var
  a,b,i,k:longint;
  n:string;
  p:boolean;
begin
  readln(a,b);
  readln(n);
  k:=pos('-',n);
  p:=true;
  for i:=1 to k-1 do if not(n[i] in ['0'..'9']) then p:=false;
  for i:=k+1 to a+b+1 do if not(n[i] in ['0'..'9']) then p:=false;
  if p and (k=b+1) then writeln('Yes') else writeln('No');
end.