var
i,j,c,d,e,b,n,a:longint;
s,s1,s2,s3:string;
begin
readln(a,b);
readln(s);
if s[a+1]<>'-' then begin writeln('No');exit;end;
for i:=1 to length(s) do
if not(s[i] in ['0'..'9']) then inc(e);
if e>=2 then writeln('N0')
else
writeln('Yes');
end.