var kt:boolean;st,xd:string;i:longint;ch:char;
begin
read(St);
ch:='a';
kt:=true;
for i:=1 to length(st) do
     begin
        if st[i]>ch then
                begin
                kt:=false;
                write('no');
                break;
                end;
        if kt then if st[i]=ch then inc(ch);
        end;
if kt then write('yes');
readln
end.

var
st:ansistring;
st2:string;
n,i,r,p:longint;
begin
 readln(st);
 st2:='abcdefghijklmnopqrstuvwxyz';
 n:=length(st);
 r:=1;
 for i:=1 to n do
 begin
  p:=pos(st[i],st2);
  if p=r then r:=r+1;
  if p>r then begin
               writeln('NO');
               halt;
              end;
 end;
 writeln('YES');
end.

var i,j,m,n:longint;
    s:ansistring;
    first:array[0..31]of longint;
    flag:boolean;
begin
    readln(s);
    for i:=1 to length(s) do begin
        if first[ord(s[i])-ord('a')]=0 then begin
            first[ord(s[i])-ord('a')]:=i;
        end;
    end;
    flag:=true;
    for i:=0 to 25 do if (first[i]>first[i+1]) and (first[i+1]>0) then flag:=false;
    for i:=0 to 25 do if (first[i]=0) and (first[i+1]>0) then flag:=false;
    if flag then writeln('YES') else writeln('NO');
end.

var s:ansistring; i,a:longint;
begin
read (s);
a:=97;
for i:=1 to length (s) do
        begin
        if s[i]=chr (a) then inc (a) else if s[i]>chr (a) then begin writeln ('NO'); exit; end;
        end;
writeln ('YES');
end.

var n,m,i,j:longint;
 //   p:array['a'..'z']of boolean;
    c:char;
    s:ansistring;
    flag:boolean;
begin
readln(s);
if s[1]>'a' then begin writeln('NO');halt;end;
c:='a';
for i:=1 to length(s) do begin
  if s[i]<=c then continue;
  if s[i]=(chr(ord(c)+1)) then begin c:=chr(ord(c)+1);continue;end;
  if c='z' then continue;
  writeln('NO');flag:=true;break;
end;
if not flag then writeln('YES');
end.

VAR a:array[0..26]of longint;
    s:ansistring;
    i:longint;
BEGIN
 a[0]:=1;
 read(s);
 for i:=1 to length(s)do
  if a[ord(s[i])-96]=0 then if a[ord(s[i])-97]=0 then begin write('NO');halt;end
                                                 else a[ord(s[i])-96]:=1;
 write('YES');
END.

var alf,st:ansistring;
i,n,k,p:longint;
a:array[0..30] of longint;
begin
  alf:='abcdefghijklmnopqrstuvwxyz';
  readln(st);
  n:=length(st);

  a[0]:=1;
  for i:=1 to n do
    begin
      p:=pos(st[i],alf);
      if a[p]=0 then begin
                       if a[p-1]>0 then inc(a[p])
                         else begin
                                writeln('NO');
                                halt;
                              end;
                     end;
    end;
  writeln('YES');
end.

var a:array[1..26] of longint;
    i,j:longint;
    s:ansistring;data:boolean;
begin
readln(S);
for i:=1 to 26 do
for j:=1 to length(s) do
if s[j]=chr(ord('a')+i-1) then begin
                               a[i]:=j;
                               break
                               end;
for i:=1 to 25 do
if (a[i]=0)and(a[i+1]<>0) then data:=true;
for i:=1 to 25 do
if (a[i+1]<>0)AND(a[i+1]<a[i]) then data:=true;
if data then writeln('NO')
else writeln('YES');
end.

var i,t: longint;
s: string;
b: boolean;
begin
t:=97;
read(s);
for i:=1 to length(s) do
begin
  if ord(s[i])=t then inc(t);
  if ord(s[i])>t then b:=true;
end;
if b=true then write('NO') else write('YES');
readln
end.

{$H+}
var
  a, b, c, d, i, k: int64;
  s: string;
  used: array [1..200] of boolean;

begin
  readln(s);
  i := 1;
  k := 0;
  while i <= length(s) do begin
    if not(used[ord(s[i])]) then begin
      if ord(s[i]) - ord('a') > k then begin
        writeln('NO');
        halt();
      end;
      inc(k);
      used[ord(s[i])] := true;
    end;
    inc(i);
  end;
  writeln('YES');
end.

program cf;
  var
    s: ansistring;
    c: char;
    i: word;
  BEGIN
    readln(s);
    if s[1]<>'a' then
                   begin
                     writeln('NO');
                     halt(0);
                   end;
    c:=s[1];
    for i:=2 to length(s) do
      if (s[i]>c) then
                    begin
                      if (ord(s[i]) - ord(c) <> 1) then
                                                     begin
                                                       writeln('NO');
                                                       halt(0);
                                                     end
                                                   else c:=s[i];
                    end;

    writeln('YES');
  END.

var kt:boolean;
bcc,St:string;
i,y:longint;
A:array[1..100]of longint;
begin
kt:=true;
readln(St);
bcc:='abcdefghijklmnoprstuvwxyz';
if St[1]<>'a' then writeln('No') else
begin
i:=2;
y:=2;
while (kt)and(i<=length(St)) do
        begin
        if pos(St[i],bcc)=y then inc(y)
                        else if pos(St[i],bcc)>y then kt:=false;
        inc(i);
        end;
if kt then writeln('YES')
        else writeln('NO');
        end;
        readln;
end.

var i,w:longint;
a:array['a'..'z'] of longint;
j:char;
s:ansistring;
begin
   {assign(input,'input.txt');
   assign(output,'output.txt');
   reset(input);
   rewrite(output);}
   read(s);
   for i:=1 to length(s) do
   begin
      a[s[i]]:=1;
      for j:='a' to s[i] do if a[j]=0 then w:=1;
   end;
   if w=1 then write('NO') else write('YES');
end.

var s: ansistring;
i,n,k,num: longint;
b: array ['a'..'z'] of boolean;
c,j: char;
procedure stop;
begin
write('NO');
halt;
end;

begin
{assign(input,'input.txt');
reset(input);
assign(output,'output.txt');
rewrite(output);  }
read(s);
n:=length(s);
fillchar(b,sizeof(b),false);
for i:= 1 to n do
  begin
    c:=s[i];
    b[c]:=true;
    for j:='a' to c do
      if b[j]=false then stop;
  end;
write('YES');
end.

var alf:string;
st:ansistring;
i,l,k,p:longint;
a:array[0..30] of longint;
begin
  alf:='abcdefghijklmnopqrstuvwxyz';
  readln(st);
  l:=length(st);
  a[0]:=1;
  for i:=1 to l do
    begin
      p:=pos(st[i],alf);
      if a[p]=0 then begin
                       if a[p-1]>0 then inc(a[p])
                         else begin
                                writeln('NO');
                                halt;
                              end;
                     end;
    end;
  writeln('YES');
end.

var s:string;
    i,k:longint;
begin
  readln(s);
  k:=96;

  for i:=1 to length(s) do
    if ord(s[i]) - k > 1 then begin writeln('NO'); exit; end
      else if ord(s[i]) > k then k:=ord(s[i]);

  writeln('YES');

end.

var c,k:char;
    s,t:ansistring;
    i,j:longint;
begin
{assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output);            }
read(s);
k:='a';
t:='YES';
for c in s do
  begin
    if c=k then
      begin
         inc(k);
      end else if c>k then t:='NO'
  end;
write(t)
end.

var
	s : ansistring;
    c : char;
    i : longint;

begin

    readln(s);
    c := 'a';
    for i := 1 to length(s) do
    begin
		if s[i] < c then
        	continue;
        if s[i] = c then
        	inc(c)
        else begin
            writeln('NO');
            halt;
        end;
    end;
    writeln('YES');

end.

var s:ansistring;i,sc:integer;
begin
readln(s);
sc:=97;
For i:=1 to length(s) do
If ord(s[i])>sc
 then begin writeln('NO');halt;end
 else if sc=ord(s[i])
       then sc:=sc+1;
writeln('YES');
end.

program qq;
var a:array[1..500]of integer;
s:string;
dl,i,k,res:integer;

begin
read(s);
dl:=length(s);
for i:=1 to dl do begin
If s[i]='a' then a[i]:=1;
If s[i]='b' then a[i]:=2;
If s[i]='c' then a[i]:=3;
If s[i]='d' then a[i]:=4;
If s[i]='e' then a[i]:=5;
If s[i]='f' then a[i]:=6;
If s[i]='g' then a[i]:=7;
If s[i]='h' then a[i]:=8;
If s[i]='i' then a[i]:=9;
If s[i]='j' then a[i]:=10;
If s[i]='k' then a[i]:=11;
If s[i]='l' then a[i]:=12;
If s[i]='m' then a[i]:=13;
If s[i]='n' then a[i]:=14;
If s[i]='o' then a[i]:=15;
If s[i]='p' then a[i]:=16;
If s[i]='q' then a[i]:=17;
If s[i]='r' then a[i]:=18;
If s[i]='s' then a[i]:=19;
If s[i]='t' then a[i]:=20;
If s[i]='u' then a[i]:=21;
If s[i]='v' then a[i]:=22;
If s[i]='w' then a[i]:=23;
If s[i]='x' then a[i]:=24;
If s[i]='y' then a[i]:=25;
If s[i]='z' then a[i]:=26;
end;
k:=1;
res:=0;
if a[1]<>1 then res:=res+1;
for i:=1 to dl do begin
if a[i]<=k then res:=res+0 else
if a[i]-k=1 then k:=k+1 else res:=res+1;
end;
if res=0 then writeln('YES') else writeln('NO') ;
end.

var kt:array[0..100000] of longint;
    i,n:longint;
    s:ansistring;
begin
readln(s);
n:=length(s);
kt[96]:=1;
For i:=1 to n do
    begin
        if kt[ord(s[i])-1]=0 then
            begin
                writeln('NO');
                halt;
            end else kt[ord(s[i])]:=1;
    end;
writeln('YES');
end.

  var S : AnsiString;
      last : char;
      i : LongInt;
begin
  readLn ( S ) ;

  last := 'a';

  for i := 1 to Length(S) Do
  begin

    if ( S[i] = last ) then
      inc ( last )
    else if ( S[i] > last ) then
    begin
      writeLn ( 'NO' ) ;
      halt();
    end;

  end;

  writeLn ( 'YES' );
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
    s: string;
    i, j: integer;
    b: array[1..26] of boolean;
begin
    readln(s);
    for i := 1 to length(s) do begin
        b[ord(s[i]) - 96] := true;
        for j := ord(s[i]) - 96 downto 1 do
            if(b[j] <> true) then begin
                writeln('NO');
                exit;
            end;
    end;
    writeln('YES');
  end.

  const eps=0.000000001;
   besk=9000000000000000008;  nn=200000;
   label 1,2,3;
    type   { real=double;}  {string=ansistring;}
    mas=array [0..nn] of longint;   point=record x,y,z:real;end;
    zap=record p1,p2,p3 :int64;end; zap1=^zap;
    mass=array[0..nn] of longint;mass1=^mass;
    var aa,bb,left,right,modul,ot3,ot2,ot1,nap,posx,posy,xx,yy,n,m,tt1,tt2,q,pp,tt,dx,dy,mmin,kk,gr,ttt,t,kol,pos,x1,x2,p,pmax,imax,p1,p2,p3,p4,l,ot,nm,s1,s2,s,smin,cen,dl,t2,i1:int64;
    t1,k,time,jj,step, ii,i,j:longint;
    { aa,bb,cc:double;
    }
    ss2,sss,ss,ss1:string;
    last:array[-1..5000,0..25] of int64;
     dd,npx,npy:array[-1000..500000] of int64;
     zifr:array[0..1000000,0..9] of longint;
    sdv, dp,binom:array[-1..500,-1..500] of int64;
     prost,zan:array[-10000..10000000] of boolean;
     kolnap  :array[0..31,-200..200,-200..200] of longint;
     finnap: array[0..31,-1..20,-200..200,-200..200] of byte;
     c,z,x,y,aold,b,a:array[-100000..1000002] of int64;
     dda:array[-10..12000] of extended;
   zanx,zany:array[-10..200000] of boolean;
   polog:array[-10..200004, 0..5] of int64;
    corr,zzan:array[-1000..3000,-1000..3000] of boolean;
    ssss:array[-1000..1000000] of string;
     fl:array[-10000..600000] of boolean;
    ch:char;
    pole1,pole :array [-10..2000,-10..2000] of char;
    st:array[-10..100000] of string;
    st2:array[0..nn] of string;
     v0,v1,s0,t0:real;
     zv:point;
     newx,newy:array[-1..200000] of int64;

     yot:double;
       flag2,oldflag,flag,flag1:boolean;
    function al(x,y:extended):extended; var t0,t1,p,s0,s1:extended;
 begin
     if (x>0)and(y>=0) then p:=arctan(y/x);
     if x<0 then p:=pi+arctan(y/x);
     if(x>0)and(y<0) then p:=2*pi+arctan(y/x);
     if x=0 then if (y>=0) then p:=pi/2 else p:=3*pi/2;
     al:=p/pi*180;
 end;
  function min(x,y:int64):int64;begin min:=x;if y<x then min:=y; end;
  function max(x,y:int64):int64;begin max:=x;if y>x then max:=y; end;

  function nod(x,y:int64):int64; var z:int64;
begin   repeat  z:=x mod y;x:=y;y:=z;   until  z=0 ;  nod:=x;end;

begin
  { assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
   }

     readln(ss);
     n:=length(ss);
     for i:=n downto 1 do
       begin
         t:=ord(ss[i])-ord('a');
         a[t]:=i;

       end;

    {  for i:=0 to 25 do write(a[i],' ');
      writeln;
     }
    t:=0;
    for i:=0 to 25 do if a[i]>0 then t:=i;
    flag:=true;
    for i:=0 to t-1 do if a[i+1]<a[i] then flag:=false;
    if a[0]=0 then flag:=false;
    if flag then write('YES') else write('NO');

1:          close(output);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a: array ['a'..'z'] of boolean;
  s: string;
  i, j: integer;
  boo: boolean;

begin
  readln(s);
  for i := 1 to length(s) do
  begin
    a[s[i]] := true;
    boo := true;
    for j := ord(s[i]) downto 97 do boo := a[chr(j)] and boo;
    if not boo then
    begin
      writeln('NO');
      halt(0);
    end;
  end;
  writeln('YES');
end.

program f2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a: array[0..26] of boolean;
  i: integer;
  ch: char;
begin
  a[0] := true;
  for i := 1 to 26 do
    a[i] := false;

  while not eoln do
    begin
      read(ch);
      if a[ord(ch)-97] then
        a[ord(ch)-96] := true
      else begin
        writeln('NO');
        readln;
        exit;
      end;
    end;

  writeln('YES');
  readln;

end.

{$A8,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O-,P+,Q-,R+,S+,T-,U-,V+,W-,X+,Y+,Z1}
{$MINSTACKSIZE $00004000}
{$MAXSTACKSIZE $00100000}
{$IMAGEBASE $00400000}
{$APPTYPE CONSOLE}

const filename='a';
      oo=maxlongint div 2;
      eps=1e-6;
      eee=1e-21;

var qq,cc,a,aa:array[0..1000000]of longint;
    qc,he:array[0..2014,0..2014]of longint;
    s,ss,sss,s0,s1,s2,s3:string;
    x,y,z,xx,yy,zz,x0,y0,z0,x1,x2,x3,y1,y2,y3,z1,z2,z3:extended;
    nt,ii,jj,n,m,q,c,q0,c0,q1,c1,q2,c2,q3,c3:longint;
    nn,mm,kk,u,v,res,cur,max,min:longint;
    test,ll,t,tt:longint;
    b,bb,bbb,b0,b1,b2,b3:boolean;

function mx(q,c:longint):longint;
  begin
  if q>c then mx:=q else mx:=c;
  end;

function mn(q,c:longint):longint;
  begin
  if q<c then mn:=q else mn:=c;
  end;

procedure init;
  begin
  assign(input,filename+'.in');
  assign(output,filename+'.out');
  reset(input);
  rewrite(output);
  end;

procedure fin;
  begin
  close(input);
  close(output);
  end;

procedure clear;
var i,j,k:longint;
  begin
  fillchar(qc,sizeof(qc),0);
  end;

procedure load;
var i,j,k:longint;
  begin
  end;

procedure save;
var i,j,k:longint;
  begin
  end;

procedure run;
var i,j,k:longint;
  begin
  //init;
  readln(s);
  n:=0;
  b:=true;
  for i:=1 to length(s) do
    begin
    k:=ord(s[i])-ord('a');
    if k>n then b:=false;
    if k=n then inc(n);
    end;
  if b then writeln('YES') else writeln('NO');
  //fin;
  end;

begin
nt:=1;
//readln(nt);
for test:=1 to nt do
  begin
  clear;
  load;
  run;
  save;
  end;
end.

var a,s,d,f,g,h,j,k,l,i,ii:longint;
z:ansistring;
v:char;
x:array['a'..'z']of longint;
c:array['a'..'z']of longint;
begin
readln(z);
for i:=1 to length(z)do
inc(x[z[i]]);

i:=26;
while x[chr(i+96)]=0 do
dec(i);

while (i<>0)and(x[chr(i+96)]<>0) do
dec(i);
if i=0 then
begin
for ii:=1 to length(z) do
if c[z[ii]]=0 then
c[z[ii]]:=ii;
for v:='a' to 'y' do
if (c[v]>c[chr(ord(v)+1)])and(x[chr(ord(v)+1)]<>0)then
begin
writeln('NO');
halt;
end;
writeln('YES');
end
else writeln('NO');
end.

program cf765B;
var s:ansistring;
    i,cur:longint;
begin
  readln(s);
  cur:=ord('a')-1;
  for i:=1 to length(s) do
  begin
    if ord(s[i])>cur+1 then begin writeln('NO'); halt;end;
    if ord(s[i])>cur then cur:=ord(s[i]);
  end;
  writeln('YES');
end.

Program round397codefN2(virtual_);
Var s: string;
    c, cur: integer;

Begin
 read(s);
 cur:= ord('a');
 If s[1] = 'a' then
  For c:= 1 to length(s) do begin
   if ord(s[c]) <= cur then //nothing
   else
    if s[c] = chr(cur + 1) then cur:= ord(s[c])
    else begin
     Writeln('NO');
     halt;
    end;
  End
 Else begin writeln('NO'); halt; end;
 Writeln('YES');
End.

program zzz;
var
  s,s1:string;
  b:boolean;
  i:longint;
begin
    readln(s);
    s1:='a';
    b:=true;
    i:=2;
    if s[1]<>'a' then b:=false;
    while (i<=length(s)) and(b=true) do
    begin
        if pos(s[i],s1)=0 then
          if s[i]=chr(ord(s1[length(s1)])+1)  then
             s1:=s1+s[i]
           else b:=false;
        inc(i);
    end;
    if b=true then write('YES')
                       else write('NO');
end.

var s:ansistring;
    i:longint;
    tek:char;
begin
 read(s);
 tek:='a';
 if s[1]<>'a'
  then begin
        write('NO');
        halt;
       end;
 for i:=1 to length(s) do
  begin
   if ord(s[i])>ord(tek)+1
    then begin
          write('NO');
          halt;
         end;
   if ord(s[i])=ord(tek)+1
    then tek:=s[i]
    else continue;
  end;

 write('YES');

end.

var a:longint;s:string;q:char;
begin
 read(s);
 for q:='a' to 'z' do
 begin
  if pos(q,s)<>1 then begin write('NO');halt;end;
  a:=pos(q,s);
  while a>0 do
  begin
   delete(s,a,1);a:=pos(q,s);
  end;if s=''then begin write('YES');halt;end;
 end;
 write('YES');
end.

var s,xm:ansistring;
kt:boolean;
i:longint;
begin
readln(s);
kt:=true;
xm:='';
if s[1]='a' then xm:='a';
if (s[1]<>'a') then kt:=false;
for i:=2 to length(s) do
  if length(xm)>0 then
    begin
    if (pos(s[i],xm)=0) and (ord(s[i])=ord(xm[length(xm)])+1) then xm:=xm+s[i];
    if pos(s[i],xm)=0 then kt:=false;
    end;

if kt then write('yes') else write('no');
end.

var
  f : array['a'..'z'] of longint;
  c : char;
  i,j : longint;
  s : ansistring;

begin
  readln(s); c:='a';
  for i:=1 to length(s) do if f[s[i]] = 0 then begin
    if s[i] <> c then begin writeln('NO'); halt; end;
    f[s[i]]:=1;
    c:=chr(ord(c)+1);
  end;
  writeln('YES');
end.

Program p1;
var s:ansistring;
    i:integer;
    u:boolean;
    c:char;
    m:set of char;
Begin
     readln(s);
     m:=[];
     i:=2;
     u:=true;
     c:='a';
     if s[1]='a' then begin
                      include(m,'a');
                      for i:=2 to length(s) do if (not(s[i] in m)) and (chr(ord(c)+1)=s[i]) then begin
                                                                      include(m,s[i]);
                                                                      c:=s[i];
                                                                      end
                                                                      else if not(s[i] in m) then u:=false;
                      if u then writeln('Yes')
                           else writeln('No');

                      end
                 else writeln('No');
end.

program z1;
var a,b,c,d,i,j,k,l,m,n,last:longint; Z:array['a'..'z'] of longint;  s:ansistring; ch:char;
Q:array[1..100] of longint;

Function max(x,y:longint):longint;
begin
if x>y then exit(x) else exit(y);
end;

begin
//assign(input,'d:\input.txt'); reset(input);
//assign(output,'d:\output.txt'); rewrite(output);
readln(s);
for i:=1 to length(s) do if Z[s[i]]=0 then begin Z[s[i]]:=i; last:=max(last,ord(s[i])-ord('a')+1); end;
for ch:='a' to 'z' do begin inc(n); Q[n]:=Z[ch]; end;
for i:=1 to last-1 do
 begin
 if (Q[i]>=Q[i+1]) or (Q[i]=0) then begin write('NO'); exit; end;
 end;
write('YES');
end.

var s:ansistring;
c:char;
i:longint;

begin
//assign(input,'dmhx.in');reset(input);
//assign(output,'dmhx.out');rewrite(output);
readln(s);
c:='a';
for i:=1 to length(s) do
  if s[i]>c then
    begin
    write('NO');
    close(input);close(output);
    halt;
    end
  else
    if s[i]=c then c:=succ(c);
write('YES');
close(input);close(output);

end.

var t,i:longint;
    s:ansistring;
begin
//assign(input,'dmhx.in');reset(input);
//assign(output,'dmhx.out');rewrite(output);
readln(s);
t:=0;
for i:=1 to length(s) do
  if (ord(s[i])-96-t>1) then
    begin
    writeln('NO');
    close(input);close(output);
    halt;
    end
  else if ord(s[i])-96>t then t:=t+1;
writeln('YES');
close(input);close(output);
end.

var u,i:integer;
s:ansistring;
procedure del;
        var i:integer;
        begin
        i:=1;
        while i<=length(s) do
                if ord(s[i])=u then
                        begin
                        delete(s,i,1);
                        end else inc(i);
        end;
begin
readln(s);
u:=97;
while length(s)<>0 do
        if ord(s[1])=u then
                begin
                del;
                inc(u);
                end else
                begin
                write('NO');
                halt;
                end;
write('YES');
end.

var
 n,i,x : longint;
 s : ansistring;
 c: char;

begin
  x:=97;
  readln(s);
  c:=chr(x);

  i:=1;

  while i <= length(s) do begin
     while (i <= length(s)) and  (s[i] < c) do inc(i);
      if i > length(s) then begin
       writeln('YES');
       halt;
      end;

      if s[i] = c then begin
       inc(x);
       c:=chr(x);
      end else begin
       writeln('NO');
       halt;
      end;
    end;

end.

var
  a,b,i,n,k,j:longint;
  s,t:string;
  cnt:array[1..1111]of longint;
  was:array[1..26]of boolean;
  ch:char;
  x:array[1..111]of char;
begin
  readln(s);

  for i:=1 to 26 do
  x[i]:=chr(i+96);

  t:='';
    for j:=1 to length(s) do
      for i:=1 to 26 do
      begin
        if (x[i]=s[j]) and not was[i] then begin t:=t+s[j];was[i]:=true;break;end;
      end;

  for i:=1 to length(t) do
  cnt[i]:=ord(t[i]);

  if ord(t[1])>97 then begin writeln('NO');halt;end;
  for i:=1 to length(t)-1 do
  if cnt[i]+1<>cnt[i+1] then begin writeln('NO');halt;end;
  writeln('YES');
end.

program ix;

var
  s: string;
  i, o: integer;
  c: boolean;

begin
  readln(s);
  i := 0;
  o := 97;
  c:=true;
  repeat
    i := i + 1;
    if ord(s[i]) > o then begin c := false;break end;
    if ord(s[i]) = o then o := o + 1;
  until i = length(s);
  if (c) then writeln('YES') else writeln('NO');
end.

var a,nom,b:array[0..26]of longint;
s,alf,s1:ansistring;
n,i,p,l,r,kl,q:longint;
begin
  readln(s);
  n:=length(s);
  alf:='abcdefghijklmnopqrstuvwxyz';
  for i:=1 to n do
    begin
      p:=pos(s[i],alf);
      if a[p]=0 then a[p]:=i;
    end;
   for i:=1 to 26 do
     if (a[i]=0)and(kl=0) then kl:=1
     else if (kl=1)and(a[i]<>0)then begin
                                      writeln('NO');
                                      halt;
                                    end;
  kl:=0;
   for i:=1 to 26 do
     if a[i]<>0 then begin
                       q:=q+1;
                       b[q]:=a[i];
                     end;
   for i:=1 to q do
     if b[i]<b[i-1] then begin
                           kl:=1;
                           break;
                         end;
  {for i:=1 to 26 do
    if a[i]<>0 then begin
                      l:=i;
                      break;
                    end;
  for i:=l+1 to 26 do
    if a[i]<>0 then begin
                      r:=i;
                      if a[r]<a[l] then begin
                                          kl:=1;
                                          break;
                                        end;
                      l:=r;
                    end;}
  if kl=0 then writeln('YES')
          else writeln('NO');
end.

program j01;
var s:ansistring;
    bo:array['a'..'z']of boolean;
    n,i:longint;
begin
  readln(s);
  for i:=1 to length(s) do
  begin
    if(s[i]='a')or bo[chr(ord(s[i])-1)] then
    begin
      bo[s[i]]:=true;
    end else
    begin
      writeln('NO');halt;
    end;
  end;
  writeln('YES');
end.

var s,t: string;
        dd: array[1..150] of boolean;
        i,j: integer;
begin
        readln(s);
        readln(t);
        if t <>'' then s:=s+t;
        t:='YES';
        j:=97;
        if s[1]<>'a' then
        begin
                t:='NO';
        end else
        for i := 2 to length(s) do
        begin
                if not((ord(s[i])<=j)or(ord(s[i])=j+1)) then
                begin
                        t:='NO';
                        break;
                end;
                if ord(s[i])>j then j:=ord(s[i]);
        end;
        write(t);
end.

var a:array[0..200]of longint;
st,alf:ansistring;
n,i,p:longint;
begin
  readln(st);
  n:=length(st);
  alf:='abcdefghijklmnopqrstuvwxyz';
  a[0]:=1;
  for i:=1 to n do
  begin
    p:=pos(st[i],alf);
    if a[p-1]=0 then begin
                       writeln('NO');
                       halt;
                     end;
    a[p]:=1;
  end;
  writeln('YES');
end.

var vis:array[0..30] of boolean;
    last:array[0..30] of longint;
    ch:char;
	i,j:longint;
	ans:boolean;
begin
  fillchar(vis,sizeof(vis),false);
  fillchar(last,sizeof(last),0);
  i:=0;
  while not(eoln) do
  begin
    inc(i);
    read(ch);
    if (last[ord(ch)-96]=0) then last[ord(ch)-96]:=i;
    vis[ord(ch)-96]:=true;
  end;
  readln;
  i:=1;
  while (i<=26) and vis[i] do inc(i);
  ans:=true;
  for j:=i to 26 do
	if vis[j] then ans:=false;
  for j:=1 to i-2 do
	if (last[j]>last[j+1]) then ans:=false;
  if ans then writeln('YES') else writeln('NO');
end.

var s:ansistring;
	ib:char;
	a:array['a'..'z'] of longint;
	i,l,f,k:longint;
begin
//assign(input,'input.txt');
//reset(input);
	readln(s);
	k:=0;
	f:=0;
	for ib:='a' to 'z' do
		begin
			inc(k);
			a[ib]:=k;
		end;
	l:=1;
	for i:=1 to length(s) do
		begin
			if a[s[i]] > l then	begin
									f:=1;
									break;
						    	end;
			if a[s[i]] = l then	inc(l);
		end;
   if f=1 then writeln('NO')
   			else writeln('YES');
end.

var s:ansistring;
i,c:longint;
begin
readln(s);
c:=ord('a');
for i:=1 to length(s) do begin
        if ord(s[i])>c then begin
                write('NO');
                exit;
        end else if ord(s[i])=c then
                inc(c);
end;
write('YES');
end.

program cf;
var i,j: longint;
    s: ansistring;
    f:boolean;
    a: array[1..26] of longint;
begin
readln(s);
for i:=1 to length(s) do
begin
f:=false;
inc(a[ord(s[i])-ord('a')+1]);
for j:=1 to 26 do
begin
if a[j]=0 then
f:=true;
if (f) and (a[j]<>0) then
begin
write('NO');
exit;
end;
end;
end;
write('YES');
end.

var vis:array[0..30] of boolean;
    ch:char;
	i,j:longint;
	ans:boolean;
begin
  fillchar(vis,sizeof(vis),false);
  while not(eoln) do
  begin
    read(ch);
    vis[ord(ch)-96]:=true;
  end;
  readln;
  i:=1;
  while (i<=26) and vis[i] do inc(i);
  ans:=true;
  for j:=i to 26 do
	if vis[j] then ans:=false;
  if ans then writeln('YES') else writeln('NO');
end.

var n,m,i,j:longint;
    p:array['a'..'z']of boolean;
    c:char;
    s:ansistring;
    flag:boolean;
begin
readln(s);
c:='a';
for i:=1 to length(s) do begin
  if s[i]<=c then continue;
  if s[i]=(chr(ord(c)+1)) then begin c:=chr(ord(c)+1);continue;end;
  writeln('NO');flag:=true;break;
end;
if not flag then writeln('YES');
end.

var st:ansistring;
a,b:array['a'..'z'] of longint;
sim,s1:char;
i,j,n,k:longint;

begin
  readln(st);
  n:=length(st);

  for i:=1 to n do
   inc(a[st[i]]);

  for sim:='a' to 'z' do
   begin
    i:=i+1;
    b[sim]:=i;
   end;

  for sim:='a' to 'z' do
   if a[sim]=0 then begin
                     s1:=sim;
                     break;
                    end;

  for sim:=s1 to 'z' do
   if a[sim]>0 then begin
                     writeln('NO');
                     halt;
                    end;
                    writeln('YES');
end.

var kt:boolean;
bcc,St:string;
i,y:longint;
A:array[1..100]of longint;
begin
kt:=true;
readln(St);
bcc:='abcdefghijklmnoprstuvwxyz';
for i:=1 to length(St) do
         inc(A[pos(St[i],bcc)]);

for i:= 1 to 100 do
                if A[i]=0 then for y:=i to 100 do
                                if A[y]<>0 then kt:=false;
if kt then writeln('YES')
        else writeln('NO');
readln;
end.

var kt:boolean;
bcc,St:string;
i,y:longint;
A:array[1..100]of longint;
begin
kt:=true;
readln(St);
if St[1]<>'a' then writeln('NO')
        else begin
bcc:='abcdefghijklmnoprstuvwxyz';
for i:=1 to length(St) do
         inc(A[pos(St[i],bcc)]);

for i:= 1 to 100 do
                if A[i]=0 then for y:=i to 100 do
                                if A[y]<>0 then kt:=false;
if kt then writeln('YES')
        else writeln('NO');
        end;
        readln;
end.

var alf:string;
st:ansistring;
i,l,k,p:longint;
a:array[1..30] of longint;
begin
  alf:='abcdefghijklmnopqrstuvwxyz';
  readln(st);
  l:=length(st);
  for i:=1 to l do
    begin
      p:=pos(st[i],alf);
      inc(a[p]);
    end;
  for i:=1 to 26 do
    if a[i]=0 then break
      else inc(k,a[i]);
  if k<l then writeln('NO')
    else writeln('YES');
end.

var s:ansistring;i,sc:integer;
begin
readln(s);
sc:=97;
For i:=1 to length(s) do
If ord(s[i])>sc
 then begin writeln('NO');halt;end
 else sc:=sc+1;
writeln('YES');
end.

program qq;
var a:array[1..500]of integer;
s:string;
dl,i,k,res:integer;

begin
read(s);
dl:=length(s);
for i:=1 to dl do begin
If s[i]='a' then a[i]:=1;
If s[i]='b' then a[i]:=2;
If s[i]='c' then a[i]:=3;
If s[i]='d' then a[i]:=4;
If s[i]='e' then a[i]:=5;
If s[i]='f' then a[i]:=6;
If s[i]='g' then a[i]:=7;
If s[i]='h' then a[i]:=8;
If s[i]='i' then a[i]:=9;
If s[i]='j' then a[i]:=10;
If s[i]='k' then a[i]:=11;
If s[i]='l' then a[i]:=12;
If s[i]='m' then a[i]:=13;
If s[i]='n' then a[i]:=14;
If s[i]='o' then a[i]:=15;
If s[i]='p' then a[i]:=16;
If s[i]='q' then a[i]:=17;
If s[i]='r' then a[i]:=18;
If s[i]='s' then a[i]:=19;
If s[i]='t' then a[i]:=20;
If s[i]='u' then a[i]:=21;
If s[i]='v' then a[i]:=22;
If s[i]='w' then a[i]:=23;
If s[i]='x' then a[i]:=24;
If s[i]='y' then a[i]:=25;
If s[i]='z' then a[i]:=26;
end;
k:=1;
res:=0;
for i:=1 to dl do begin
if a[i]<=k then res:=res+0 else
if a[i]-k=1 then k:=k+1 else res:=res+1;
end;
if res=0 then writeln('YES') else writeln('NO') ;
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
    s: string;
    i, j: integer;
begin
    readln(s);
    i := 1;
    while(i <= length(s)) do begin
        j := i + 1;
        while(j <= length(s)) do begin
            if(s[i] = s[j]) then
                delete(s, j, 1);
            inc(j);
        end;
        inc(i);
    end;
    for i := 1 to length(s) - 1 do
        if(ord(s[i]) <> ord(s[i + 1]) - 1) then begin
            writeln('NO');
            exit;
        end;
    writeln('YES');
  end.

  const eps=0.000000001;
   besk=9000000000000000008;  nn=200000;
   label 1,2,3;
    type   { real=double;}  {string=ansistring;}
    mas=array [0..nn] of longint;   point=record x,y,z:real;end;
    zap=record p1,p2,p3 :int64;end; zap1=^zap;
    mass=array[0..nn] of longint;mass1=^mass;
    var aa,bb,left,right,modul,ot3,ot2,ot1,nap,posx,posy,xx,yy,n,m,tt1,tt2,q,pp,tt,dx,dy,mmin,kk,gr,ttt,t,kol,pos,x1,x2,p,pmax,imax,p1,p2,p3,p4,l,ot,nm,s1,s2,s,smin,cen,dl,t2,i1:int64;
    t1,k,time,jj,step, ii,i,j:longint;
    { aa,bb,cc:double;
    }
    ss2,sss,ss,ss1:string;
    last:array[-1..5000,0..25] of int64;
     dd,npx,npy:array[-1000..500000] of int64;
     zifr:array[0..1000000,0..9] of longint;
    sdv, dp,binom:array[-1..500,-1..500] of int64;
     prost,zan:array[-10000..10000000] of boolean;
     kolnap  :array[0..31,-200..200,-200..200] of longint;
     finnap: array[0..31,-1..20,-200..200,-200..200] of byte;
     c,z,x,y,aold,b,a:array[-100000..1000002] of int64;
     dda:array[-10..12000] of extended;
   zanx,zany:array[-10..200000] of boolean;
   polog:array[-10..200004, 0..5] of int64;
    corr,zzan:array[-1000..3000,-1000..3000] of boolean;
    ssss:array[-1000..1000000] of string;
     fl:array[-10000..600000] of boolean;
    ch:char;
    pole1,pole :array [-10..2000,-10..2000] of char;
    st:array[-10..100000] of string;
    st2:array[0..nn] of string;
     v0,v1,s0,t0:real;
     zv:point;
     newx,newy:array[-1..200000] of int64;

     yot:double;
       flag2,oldflag,flag,flag1:boolean;
    function al(x,y:extended):extended; var t0,t1,p,s0,s1:extended;
 begin
     if (x>0)and(y>=0) then p:=arctan(y/x);
     if x<0 then p:=pi+arctan(y/x);
     if(x>0)and(y<0) then p:=2*pi+arctan(y/x);
     if x=0 then if (y>=0) then p:=pi/2 else p:=3*pi/2;
     al:=p/pi*180;
 end;
  function min(x,y:int64):int64;begin min:=x;if y<x then min:=y; end;
  function max(x,y:int64):int64;begin max:=x;if y>x then max:=y; end;

  function nod(x,y:int64):int64; var z:int64;
begin   repeat  z:=x mod y;x:=y;y:=z;   until  z=0 ;  nod:=x;end;

begin
  { assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
   }

     readln(ss);
     n:=length(ss);
     for i:=n downto 1 do
       begin
         t:=ord(ss[i])-ord('a');
         a[t]:=i;

       end;

     { for i:=0 to 25 do write(a[i],' ');
      }
    t:=0;
    for i:=0 to 25 do if a[i]>0 then t:=i;
    flag:=true;
    for i:=1 to t-1 do if a[i+1]<a[i] then flag:=false;

    if flag then write('YES') else write('NO');

1:          close(output);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a: array ['a'..'z'] of boolean;
  s: string;
  i: integer;
begin
  readln(s);
  for i := 1 to length(s) do
    a[s[i]] := true;
  for i := 122 downto 98 do
    if(a[chr(i)]) and not (a[chr(i - 1)]) then
    begin
      writeln('NO');
      halt(0);
    end;
  writeln('YES');
end.

{$A8,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O-,P+,Q-,R+,S+,T-,U-,V+,W-,X+,Y+,Z1}
{$MINSTACKSIZE $00004000}
{$MAXSTACKSIZE $00100000}
{$IMAGEBASE $00400000}
{$APPTYPE CONSOLE}

const filename='b';
      oo=maxlongint div 2;
      eps=1e-6;
      eee=1e-21;

var qq,cc,a,aa:array[0..1000000]of longint;
    qc,he:array[0..2014,0..2014]of longint;
    s,ss,sss,s0,s1,s2,s3:string;
    x,y,z,xx,yy,zz,x0,y0,z0,x1,x2,x3,y1,y2,y3,z1,z2,z3:extended;
    nt,ii,jj,n,m,q,c,q0,c0,q1,c1,q2,c2,q3,c3:longint;
    nn,mm,kk,u,v,res,cur,max,min:longint;
    test,ll,t,tt:longint;
    b,bb,bbb,b0,b1,b2,b3:boolean;

function mx(q,c:longint):longint;
  begin
  if q>c then mx:=q else mx:=c;
  end;

function mn(q,c:longint):longint;
  begin
  if q<c then mn:=q else mn:=c;
  end;

procedure init;
  begin
  assign(input,filename+'.in');
  assign(output,filename+'.out');
  reset(input);
  rewrite(output);
  end;

procedure fin;
  begin
  close(input);
  close(output);
  end;

procedure clear;
var i,j,k:longint;
  begin
  fillchar(qc,sizeof(qc),0);
  end;

procedure load;
var i,j,k:longint;
  begin
  end;

procedure save;
var i,j,k:longint;
  begin
  end;

procedure run;
var i,j,k:longint;
  begin
  //init;

  //fin;
  end;

begin
nt:=1;
//readln(nt);
for test:=1 to nt do
  begin
  clear;
  load;
  run;
  save;
  end;
end.

var a,s,d,f,g,h,j,k,l,i,ii:longint;
z:ansistring;
x:array['a'..'z']of longint;
begin
readln(z);
for i:=1 to length(z)do
inc(x[z[i]]);

i:=26;
while x[chr(i+96)]=0 do
dec(i);

while (i<>0)and(x[chr(i+96)]<>0) do
dec(i);
if i=0 then
writeln('YES')
else writeln('NO');
end.

Program round397codefN2(virtual_);
Var s: string;
    c, cur: integer;

Begin
 read(s);
 cur:= ord('a');
 if s[1] = 'a' then
  For c:= 1 to length(s) do begin
   if ord(s[c]) <= cur then //nothing
   else
    if s[c] = chr(cur + 1) then cur:= ord(s[c])
    else begin
     Writeln('NO');
     halt;
    end;
  End;

 Writeln('YES');
End.

Program round397codefN2(virtual_);
Var s: string;
    c, cur: integer;

Begin
 read(s);
 cur:= ord('a');
 If s[1] = 'a' then
  For c:= 1 to length(s) do begin
   if ord(s[c]) <= cur then //nothing
   else
    if s[c] = chr(cur + 1) then cur:= ord(s[c])
    else begin
     Writeln('NO');
     halt;
    end;
  End
 Else writeln('NO');
 Writeln('YES');
End.

Program round397codefN2(virtual_);
Var s: string;
    c, cur: integer;

Begin
 read(s);
 cur:= ord('a');
 For c:= 1 to length(s) do begin
  if s[c] <= chr(cur) then //nothing
  else
   if s[c] = chr(cur + 1) then cur:= ord(s[c])
   else begin
    Writeln('NO');
    halt;
   end;
 End;

 Writeln('YES');
End.

Program round397codefN2(virtual_);
Var s: string;
    c, cur: integer;

Begin
 read(s);
 cur:= ord('a');
 For c:= 1 to length(s) do begin
  if ord(s[c]) <= cur then //nothing
  else
   if s[c] = chr(cur + 1) then cur:= ord(s[c])
   else begin
    Writeln('NO');
    halt;
   end;
 End;

 Writeln('YES');
End.

program zzz;
var
  s,s1:string;
  z:char;
  i,k,k1:longint;
begin
  read(s);
  s1:='';
  for i:=1 to length(s) do
  if pos(s[i],s1)=0 then
    begin
      inc(k);
      s1:=s1+s[i];
    end;
    k1:=0;
  for z:= 'a' to (chr(ord('a')+k-1)) do
    if pos(z,s)<>0 then inc(k1);
  if (k1=k)and(s[1]='a') then writeln('YES')
          else writeln('NO');

end.

program zzz;
var
  s,s1:string;
  z:char;
  i,k,k1:longint;
begin
  read(s);
  s1:='';
  for i:=1 to length(s) do
  if pos(s[i],s1)=0 then
    begin
      inc(k);
      s1:=s1+s[i];
    end;
    k1:=0;
  for z:= 'a' to (chr(ord('a')+k-1)) do
    if pos(z,s)<>0 then inc(k1);
  if k1=k then writeln('YES')
          else writeln('NO');

end.

var x,s,xs:ansistring;c:char;
kt:boolean;
i,d,k:longint;
begin
readln(s);
kt:=true;
x:=''; xs:='';
for c:='a' to 'z' do x:=x+c;
for i:=1 to (length(s) div 2) do
        begin
        if s[i]<>s[length(s)-i+1] then kt:=false;
        d:=0;
        for k:=1 to i-1 do if (pos(s[k],x)>=pos(s[i],x)) then d:=d+1;
        if d=0 then kt:=false;
        end;
if kt then write('yes') else write('no');
end.

var s:ansistring;
kt:boolean;
i:longint;
begin
readln(s);
if (s[1]<>'a') or (s[length(s)]<>'a') then kt:=false;
kt:=true;
for i:=1 to length(s) do
    if s[i]<>s[length(s)-i+1] then kt:=false;
if kt then write('yes') else write('no');
end.

var s:ansistring;
kt:boolean;
i:longint;
begin
readln(s);
kt:=true;
if (s[1]<>'a') or (s[length(s)]<>'a') then kt:=false;

for i:=1 to length(s) do
    if s[i]<>s[length(s)-i+1] then kt:=false;
if kt then write('yes') else write('no');
end.

var s:ansistring;
kt:boolean;
i:longint;
begin
readln(s);
kt:=true;
for i:=1 to length(s) do
    if s[i]<>s[length(s)-i+1] then kt:=false;
if kt then write('yes') else write('no');
end.

var s:ansistring;
kt:boolean;
i:longint;
begin
readln(s);
kt:=true;
if (s[1]<>'a') then kt:=false;

{for i:=1 to length(s) do
    if s[i]<>s[length(s)-i+1] then kt:=false;}
for i:=2 to length(s) do
    if (ord(s[i])<ord(s[i-1])) and (pos(s[i],copy(s,1,i-1))=0) then kt:=false;
if kt then write('yes') else write('no');
end.

var x,s,xs:string;c:char;
kt:boolean;
i,d,k:longint;
begin
readln(s);
kt:=true;
x:=''; xs:='';
for c:='a' to 'z' do x:=x+c;
for i:=1 to (length(s) div 2) do
        begin
        if s[i]<>s[length(s)-i+1] then kt:=false;
        if i>1 then
        begin
        d:=0;
        for k:=1 to i-1 do if (pos(s[k],x)>=pos(s[i],x)) then d:=d+1;
        if d=0 then kt:=false;
        end;
        end;
if kt then write('yes') else write('no');
end.

var
  s : ansistring;
  f : array['a'..'z'] of longint;
  i,j,n,m,k : longint;
  c : char;

begin
  readln(s);
  for i:=1 to length(s) do inc(f[s[i]]);
  for c:='a' to 'z' do if f[c] = 0 then break;
  for c:=chr(ord(c)+1) to 'z' do if f[c] > 0 then begin writeln('NO'); halt; end;
  writeln('YES');
end.

Program p1;
var s:ansistring;
    i:integer;
    m:set of char;
Begin
     readln(s);
     m:=[];
     i:=2;
     if s[1]='a' then begin
                      while (not(s[i] in m)) and (i<length(s)) and (s[i]<s[i-1]) do begin
                                                                                include(m,s[i]);
                                                                                inc(i);
                                                                                end;
                      while (s[i] in m) and (i<=length(s)) do inc(i);
                      if i<>length(s)+1 then writeln('Yes')
                                       else writeln('No');
                      end
                 else writeln('No');
end.

var s:string;
c:char;
i:longint;

begin
//assign(input,'dmhx.in');reset(input);
//assign(output,'dmhx.out');rewrite(output);
readln(s);
c:='a';
for i:=1 to length(s)  do
  begin
  if c<s[i] then
    begin
    writeln('NO');
    close(input);
    close(output);
    halt;
    end;
  c:=succ(c);
  end;
writeln('YES');
close(input);
close(output);
end.

var t,i:longint;
    s:ansistring;
begin
//assign(input,'dmhx.in');reset(input);
//assign(output,'dmhx.out');rewrite(output);
readln(s);
t:=1;
for i:=1 to length(s) do
  if (ord(s[i])-96-t>1) then
    begin
    writeln('NO');
    close(input);close(output);
    halt;
    end
  else if ord(s[i])-96>t then t:=t+1;
writeln('YES');
close(input);close(output);
end.

var s:ansistring;
c:char;
i:longint;

begin
//assign(input,'dmhx.in');reset(input);
//assign(output,'dmhx.out');rewrite(output);
readln(s);
c:='a';
for i:=1 to length(s)  do
  begin
  if c<s[i] then
    begin
    writeln('NO');
    close(input);
    close(output);
    halt;
    end;
  c:=succ(c);
  end;
writeln('YES');
close(input);
close(output);
end.

var s:ansistring;
x:char;
i:Longint;
begin
//assign(input,'dmhx.in');reset(input);
//assign(output,'dmhx.out');rewrite(output);
readln(s);
x:=s[1];
for i:=2 to length(s) do
  if (s[i]>succ(x)) then
    begin
    writeln('NO');
    close(input);close(output);
    halt;
    end
  else
    if s[i]=succ(x) then x:=succ(x);
writeln('YES');
close(input);close(Output);
end.

var
  a,b,i,n,k,j:longint;
  s,t:ansistring;
  cnt:array[1..1111]of longint;
  was:array[1..26]of boolean;
  ch:char;
  x:array[1..111]of char;
begin
  readln(s);

  for i:=1 to 26 do
  x[i]:=chr(i+95);

  t:='';
    for j:=1 to length(s) do
      for i:=1 to 26 do
      begin
        if (x[i]=s[j]) and not was[i] then begin t:=t+s[j];was[i]:=true;break;end;
      end;

  for i:=1 to length(t) do
  cnt[i]:=ord(t[i]);

  for i:=1 to length(t)-1 do
  if cnt[i]+1<>cnt[i+1] then begin writeln('NO');halt;end;
  writeln('YES');
end.

var
  a,b,i,n,k,j:longint;
  s,t:string;
  cnt:array[1..1111]of longint;
  was:array[1..26]of boolean;
  ch:char;
  x:array[1..111]of char;
begin
  readln(s);

  for i:=1 to 26 do
  x[i]:=chr(i+95);

  t:='';
    for j:=1 to length(s) do
      for i:=1 to 26 do
      begin
        if (x[i]=s[j]) and not was[i] then begin t:=t+s[j];was[i]:=true;break;end;
      end;

  for i:=1 to length(t) do
  cnt[i]:=ord(t[i]);

  if t[1]<>'a' then begin writeln('NO');halt;end else
  if (t[2]<>'b') and (length(t)>1) then begin writeln('NO');halt;end else
  if (length(t)>2) and (t[3]<>'c') then begin writeln('NO');halt;end else
  if (length(t)>3) and (t[4]<>'d') then begin writeln('NO');halt;end else
  if (length(t)>4) and (t[5]<>'e') then begin writeln('NO');halt;end else
  if (length(t)>5) and (t[6]<>'f') then begin writeln('NO');halt;end else
  if (length(t)>6) and (t[7]<>'g') then begin writeln('NO');halt;end else
  if (length(t)>7) and (t[8]<>'h') then begin writeln('NO');halt;end else
  if (length(t)>8) and (t[9]<>'e') then begin writeln('NO');halt;end else
  if (length(t)>9) and (t[10]<>'e') then begin writeln('NO');halt;end else
  if (length(t)>10) and (t[11]<>'e') then begin writeln('NO');halt;end else
  if (length(t)>11) and (t[12]<>'e') then begin writeln('NO');halt;end else
  for i:=1 to length(t)-1 do
  if cnt[i]>cnt[i+1] then begin writeln('NO');halt;end;
  writeln('YES');
end.

var
  a,b,i,n,k,j:longint;
  s,t:ansistring;
  cnt:array[1..1111]of longint;
  was:array[1..26]of boolean;
  ch:char;
  x:array[1..111]of char;
begin
  readln(s);

  for i:=1 to 26 do
  x[i]:=chr(i+95);

  t:='';
    for j:=1 to length(s) do
      for i:=1 to 26 do
      begin
        if (x[i]=s[j]) and not was[i] then begin t:=t+s[j];was[i]:=true;break;end;
      end;

  for i:=1 to length(t) do
  cnt[i]:=ord(t[i]);

  for i:=1 to length(t)-1 do
  if cnt[i]>cnt[i+1] then begin writeln('NO');halt;end;
  writeln('YES');
end.

var
  a,b,i,n,k,j:longint;
  s,t:string;
  cnt:array[1..1111]of longint;
  was:array[1..26]of boolean;
  ch:char;
  x:array[1..111]of char;
begin
  readln(s);

  for i:=1 to 26 do
  x[i]:=chr(i+95);

  t:='';
    for j:=1 to length(s) do
      for i:=1 to 26 do
      begin
        if (x[i]=s[j]) and not was[i] then begin t:=t+s[j];was[i]:=true;break;end;
      end;

  for i:=1 to length(t) do
  cnt[i]:=ord(t[i]);

  if ord(t[1])>96 then begin writeln('NO');halt;end;
  for i:=1 to length(t)-1 do
  if cnt[i]+1<>cnt[i+1] then begin writeln('NO');halt;end;
  writeln('YES');
end.

var
  a,b,i,n,k,j:longint;
  s,t:string;
  cnt:array[1..1111]of longint;
  was:array[1..26]of boolean;
  ch:char;
  x:array[1..111]of char;
begin
  readln(s);

  for i:=1 to 26 do
  x[i]:=chr(i+95);

  t:='';
    for j:=1 to length(s) do
      for i:=1 to 26 do
      begin
        if (x[i]=s[j]) and not was[i] then begin t:=t+s[j];was[i]:=true;break;end;
      end;

  for i:=1 to length(t) do
  cnt[i]:=ord(t[i]);

  if t[1]<>'a' then begin writeln('NO');halt;end else
  if t[2]<>'a' then begin writeln('NO');halt;end else
  if (length(t)>2) and (t[3]<>'c') then begin writeln('NO');halt;end;
  for i:=1 to length(t)-1 do
  if cnt[i]>cnt[i+1] then begin writeln('NO');halt;end;
  writeln('YES');
end.

var
  a,b,i,n,k,j:longint;
  s,t:string;
  cnt:array[1..1111]of longint;
  was:array[1..26]of boolean;
  ch:char;
  x:array[1..111]of char;
begin
  readln(s);

  for i:=1 to 26 do
  x[i]:=chr(i+95);

  t:='';
    for j:=1 to length(s) do
      for i:=1 to 26 do
      begin
        if (x[i]=s[j]) and not was[i] then begin t:=t+s[j];was[i]:=true;break;end;
      end;

  for i:=1 to length(t) do
  cnt[i]:=ord(t[i]);

  if t[1]<>'a' then begin writeln('NO');halt;end else
  if t[2]<>'b' then begin writeln('NO');halt;end else
  if (length(t)>2) and (t[3]<>'c') then begin writeln('NO');halt;end;
  for i:=1 to length(t)-1 do
  if cnt[i]>cnt[i+1] then begin writeln('NO');halt;end;
  writeln('YES');
end.

var
  a,b,i,n,k,j:longint;
  s,t:string;
  cnt:array[1..1111]of longint;
  was:array[1..26]of boolean;
  ch:char;
  x:array[1..111]of char;
begin
  readln(s);

  for i:=1 to 26 do
  x[i]:=chr(i+95);

  t:='';
    for j:=1 to length(s) do
      for i:=1 to 26 do
      begin
        if (x[i]=s[j]) and not was[i] then begin t:=t+s[j];was[i]:=true;break;end;
      end;

  for i:=1 to length(t) do
  cnt[i]:=ord(t[i]);

  if t[1]<>'a' then begin writeln('NO');halt;end else
  if (t[2]<>'b') and (length(t)>1) then begin writeln('NO');halt;end else
  if (length(t)>2) and (t[3]<>'c') then begin writeln('NO');halt;end else
  if (length(t)>3) and (t[4]<>'d') then begin writeln('NO');halt;end else
  if (length(t)>4) and (t[4]<>'e') then begin writeln('NO');halt;end;
  for i:=1 to length(t)-1 do
  if cnt[i]>cnt[i+1] then begin writeln('NO');halt;end;
  writeln('YES');
end.

var a:array[1..26]of longint;
s,alf:ansistring;
n,i,p,l,r,kl:longint;
begin
  readln(s);
  n:=length(s);
  alf:='abcdefghijklmnopqrstuvwxyz';
  for i:=1 to n do
    begin
      p:=pos(s[i],alf);
      if a[p]=0 then a[p]:=i;
    end;
  for i:=1 to 26 do
    if a[i]<>0 then begin
                      l:=i;
                      break;
                    end;
  for i:=l+1 to 26 do
    if (a[i]<>0)and(l<>0)then begin
                                r:=i;
                                if a[r]<a[l] then begin
                                                    kl:=1;
                                                    break;
                                                  end;
                                l:=0;
                              end
    else
    if (a[i]<>0)and(l=0) then l:=i;
  if kl=0 then writeln('YES')
          else writeln('NO');
end.

var a,nom,b:array[1..26]of longint;
s,alf,s1:ansistring;
n,i,p,l,r,kl,q:longint;
begin
  readln(s);
  n:=length(s);
  alf:='abcdefghijklmnopqrstuvwxyz';
  for i:=1 to n do
    begin
      p:=pos(s[i],alf);
      if a[p]=0 then a[p]:=i;
    end;
   for i:=1 to 26 do
     if a[i]<>0 then begin
                       q:=q+1;
                       b[q]:=a[i];
                     end;
   for i:=1 to q-1 do
     if b[i]>b[i+1] then begin
                           kl:=1;
                           break;
                         end;
  {for i:=1 to 26 do
    if a[i]<>0 then begin
                      l:=i;
                      break;
                    end;
  for i:=l+1 to 26 do
    if a[i]<>0 then begin
                      r:=i;
                      if a[r]<a[l] then begin
                                          kl:=1;
                                          break;
                                        end;
                      l:=r;
                    end;}
  if kl=0 then writeln('YES')
          else writeln('NO');
end.

var a:array[1..26]of longint;
s,alf:ansistring;
n,i,p,l,r,kl:longint;
begin
  readln(s);
  n:=length(s);
  alf:='abcdefghijklmnopqrstuvwxyz';
  for i:=1 to n do
    begin
      p:=pos(s[i],alf);
      if a[p]=0 then a[p]:=i;
    end;
  for i:=1 to 26 do
    if a[i]<>0 then begin
                      l:=i;
                      break;
                    end;
  for i:=l+1 to 26 do
    if a[i]<>0 then begin
                      r:=i;
                      if a[r]<a[l] then begin
                                          kl:=1;
                                          break;
                                        end;
                      l:=r;
                    end;
  if kl=0 then writeln('YES')
          else writeln('NO');
end.

var a,nom:array[1..26]of longint;
s,alf,s1:ansistring;
n,i,p,l,r,kl:longint;

procedure sort(l,r: longint);
      var
         i,j,x,y: longint;
      begin
         i:=l;
         j:=r;
         x:=a[(l+r) div 2];
         repeat
           while a[i]<x do
            inc(i);
           while x<a[j] do
            dec(j);
           if not(i>j) then
             begin
                y:=a[i];
                a[i]:=a[j];
                a[j]:=y;
                y:=nom[i];
                nom[i]:=nom[j];
                nom[j]:=y;
                inc(i);
                j:=j-1;
             end;
         until i>j;
         if l<j then
           sort(l,j);
         if i<r then
           sort(i,r);
      end;

begin
  readln(s);
  n:=length(s);
  alf:='abcdefghijklmnopqrstuvwxyz';
  for i:=1 to n do
    begin
      p:=pos(s[i],alf);
      if a[p]=0 then a[p]:=i;
    end;
   for i:=1 to 26 do
     nom[i]:=i;
   sort(1,26);
   for i:=1 to 26 do
     if a[i]<>0 then s1:=s1+alf[nom[i]];
   n:=length(s1);
   for i:=1 to n-1 do
     if s1[i]>s1[i+1] then begin
                             kl:=1;
                             break;
                           end;
  {for i:=1 to 26 do
    if a[i]<>0 then begin
                      l:=i;
                      break;
                    end;
  for i:=l+1 to 26 do
    if a[i]<>0 then begin
                      r:=i;
                      if a[r]<a[l] then begin
                                          kl:=1;
                                          break;
                                        end;
                      l:=r;
                    end;}
  if kl=0 then writeln('YES')
          else writeln('NO');
end.

var a,nom,b:array[0..26]of longint;
s,alf,s1:ansistring;
n,i,p,l,r,kl,q:longint;
begin
  readln(s);
  n:=length(s);
  alf:='abcdefghijklmnopqrstuvwxyz';
  for i:=1 to n do
    begin
      p:=pos(s[i],alf);
      if a[p]=0 then a[p]:=i;
    end;
   for i:=1 to 26 do
     if a[i]<>0 then begin
                       q:=q+1;
                       b[q]:=a[i];
                     end;
   b[0]:=0;
   for i:=1 to q do
     if b[i]<b[i-1] then begin
                           kl:=1;
                           break;
                         end;
  {for i:=1 to 26 do
    if a[i]<>0 then begin
                      l:=i;
                      break;
                    end;
  for i:=l+1 to 26 do
    if a[i]<>0 then begin
                      r:=i;
                      if a[r]<a[l] then begin
                                          kl:=1;
                                          break;
                                        end;
                      l:=r;
                    end;}
  if kl=0 then writeln('YES')
          else writeln('NO');
end.

var s,t: string;
        dd: array[1..150] of boolean;
        i,j: integer;
begin
        readln(s);
        readln(t);
        if t <>'' then s:=s+t;
        t:='YES';
        j:=98;
        if s[1]<>'a' then
        begin
                t:='NO';
        end else
        for i := 2 to length(s) do
        begin
                if not((ord(s[i])<=j)or(ord(s[i])=j+1)) then
                begin
                        t:='NO';
                        j:=ord(s[i]);
                        break;
                end;
        end;
        write(t);
end.

var s,t: string;
        dd: array[1..150] of boolean;
        i,j: integer;
begin
        readln(s);
        readln(t);
        if t <>'' then s:=s+t;
        t:='YES';
        j:=98;
        if s[1]<>'a' then
        begin
                t:='NO';
        end else
        for i := 2 to length(s) do
        begin
                if not((ord(s[i])<=j)or(ord(s[i])=j+1)) then
                begin
                        t:='NO';
                        break;
                end;
                if ord(s[i])>j then j:=ord(s[i]);
        end;
        write(t);
end.

var s,t: string;
        dd: array[1..150] of boolean;
        i,j: integer;
begin
        readln(s);
        readln(t);
        if t <>'' then s:=s+t;
        t:='YES';
        j:=98;
        if s[1]<>'a' then
        begin
                t:='NO';
        end else
        for i := 2 to length(s) do
        begin
                if not((ord(s[i])<=j)or(ord(s[i])=j+1)) then
                begin
                        t:='NO';
                        break;
                end;
                j:=ord(s[i]);
        end;
        write(t);
end.

var s,t: string;
        dd: array[1..150] of boolean;
        i,j: integer;
begin
        readln(s);
        readln(t);
        if t <>'' then s:=s+t;
        t:='YES';
        j:=98;
        if not(s[1]='a') then
        begin
                t:='NO';
        end else
        for i := 2 to length(s) do
        begin
                if not((ord(s[i])<=j)or(ord(s[i])=j+1)) then
                begin
                        t:='NO';
                        break;
                end;
        end;
        write(t);
end.

var s,t: string;
        dd: array[1..150] of boolean;
        i: integer;
        c: char;
begin
        readln(s);
        readln(t);
        if t <>'' then s:=s+t;
        t:='YES';
        for i := 1 to length(s) do dd[ord(s[i])]:=true;
        for i := 98 to 122 do if (dd[i]=true)and(dd[i-1]=false) then
        begin
                t:='NO';
                break;
        end;
        write(t);
end.

var s,t: string;
        dd: array[1..150] of boolean;
        i,j: integer;
begin
        readln(s);
        readln(t);
        if t <>'' then s:=s+t;
        t:='YES';
        j:=98;
        for i := 1 to length(s) do
        begin
                if not((ord(s[i])<=j)or(ord(s[i])=j+1)) then
                begin
                        t:='NO';
                        break;
                end;
        end;
        write(t);
end.

var st,xd:string;i:longint;
begin
read(St);
for i:=length(st) downto 1 do xd:=xd+st[i];
if (st=xd) and (st[1]='a') then write('yes')
        else write('no');
readln
end.

var st,xd:string;i:longint;
begin
read(St);
for i:=length(st) downto 1 do xd:=xd+st[i];
if st=xd then write('yes')
        else write('no');
readln
end.

var s1:string;
    i:char;
begin
  readln(s1);
  for i:='a' to 'z' do
    if (pos(i,s1) = 0) and (s1 <> '') then begin writeln('NO'); exit; end
      else
        while pos(i,s1) <> 0 do delete(s1,pos(i,s1),1);
  writeln('YES');
end.