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