Where do odds begin, and where do they end? Where does hope emerge, and will they ever break?Given an integer sequence a1, a2, ..., an of length n. Decide whether it is possible to divide it into an odd number of non-empty subsegments, the each of which has an odd length and begins and ends with odd numbers.A subsegment is a contiguous slice of the whole sequence. For example, {3, 4, 5} and {1} are subsegments of sequence {1, 2, 3, 4, 5, 6}, while {1, 2, 4} and {7} are not.

The first line of input contains a non-negative integer n (1 ≤ n ≤ 100) — the length of the sequence. The second line contains n space-separated non-negative integers a1, a2, ..., an (0 ≤ ai ≤ 100) — the elements of the sequence.

Output "Yes" if it's possible to fulfill the requirements, and "No" otherwise. You can output each letter in any case (upper or lower).

NoteIn the first example, divide the sequence into 1 subsegment: {1, 3, 5} and the requirements will be met.In the second example, divide the sequence into 3 subsegments: {1, 0, 1}, {5}, {1}.In the third example, one of the subsegments must start with 4 which is an even number, thus the requirements cannot be met.In the fourth example, the sequence can be divided into 2 subsegments: {3, 9, 9}, {3}, but this is not a valid solution because 2 is an even number.

   const nn=1600000; nnn=1200000;eps=0.0000000001;
   label 1,2,3;
    var    k,step, i,j:longint;
    jj,ii,p3,p4, p1,p2,t1,t2,p,ost,q,n,ot,t,kk:int64;
     pal:array[-20..6000,-20..6000] of boolean;
     pp:extended;
      zz,z,c,d,x,y,a,b:array[-1002..2000000] of int64;
      ddnew,ddold:array[0..200,0..4040] of integer;
     per,dda,ddb:array[-10..120,-10..120] of int64;
        ss:string;

           flagg,flag,flag1:boolean;

  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);
     }

    read(n);  for i:=1 to n do read(a[i]);
    if odd(a[1])and odd(a[n])and odd(n) then write('YES') else write('NO');

   1:          close(output);
end.

Var n, a, b, i : longint;

begin
  Readln( n );
  Read( a );
  b:=a;
  For i:=1 to n-1 do
    Read( b );
  if (n and 1 = 1) and (a and 1 = 1) and (b and 1 = 1) then Writeln( 'Yes' ) else Writeln( 'No' );
end.

var
  n,i:longint;
  a:array[1..1000] of longint;
begin
  readln(n);
  if not odd(n) then
  write('No')
   else
   begin
     for i:=1 to n do
      read(a[i]);
     if (odd(a[1])) and (odd(a[n])) then
     write('Yes')
      else write('No')
   end
end.

const fi='';
      fo='';
var  n,m,i,j,k,kq:longint;
     a:array[1..1000000] of longint;

procedure openf;
begin
     assign(input,fi);  assign(output,fo);
     reset(input);  rewrite(output);
end;

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

procedure inkq;
begin
     readln(n);
     for i:=1 to n do read(a[i]);
     if (a[1] mod 2=0) or (a[n] mod 2=0) then begin writeln('No'); exit; end;
     if n mod 2=0 then write('No') else write('Yes');
end;

BEGIN
     openf;
     inkq;
     closef;
END.

var i,j,k,l,m,n:longint;
    a:array[1..5000] of longint;
begin
    readln(n);
    for i:=1 to n do read(a[i]);
    readln;
    if (a[1]mod 2=0)or(a[n] mod 2=0)or(n mod 2=0) then begin
        writeln('No');
        halt;
    end;
    writeln('Yes');
end.

program mfs;
var
dp,ep,a:array[0..1000]of longint;
n,i,j:longint;
begin
readln(n);
for i:=1 to n do read(a[i]);
fillchar(dp,sizeof(dp),0);
fillchar(ep,sizeof(ep),0);
if odd(a[1])=false then begin writeln('NO'); halt; end else dp[1]:=1;
dp[0]:=0;ep[0]:=1;ep[1]:=0;
for i:=2 to n do
begin
	if odd(a[i]) then
	for j:=0 to i-1 do
	begin
	if (odd(i-j))and(odd(a[j+1]))and(odd(a[i]))and(ep[j]=1) then dp[i]:=1;
	if (odd(i-j))and(odd(a[j+1]))and(odd(a[i]))and(dp[j]=1) then ep[i]:=1;
	//write(j,' ',dp[i],' ',ep[i],' ',a[j+1],' ',a[i-1],' ',dp[j],' ',ep[j],' ',i-j,'       ');
	end;
//writeln;
//writeln(i,' ',dp[i],' ',ep[i]);
end;
	if dp[n]=1 then writeln('YES') else writeln('NO');
//for i:=1 to n do writeln(dp[i],' ');
//for i:=1 to n do writeln(ep[i],' ');
end.

var a,i:longint;
      s:array [1..1000] of longint;
begin
  read(a);
  for i:=1 to a do read(s[i]);
  if (s[1])mod(2)=0 then begin write('No'); exit; end;
  if (s[a])mod(2)=0 then begin write('No'); exit; end;
 if (a)mod(2)=0 then begin write('No'); exit; end;
  write('Yes');
end.

program z1;
var n,i:integer; a:array[1..100]of integer;
begin
read(n);
for i:=1 to n do
read(a[i]);
if (a[n] mod 2=0)or(a[1] mod 2=0)or(n mod 2=0) then write('NO')
else write('Yes');
end.

var l,r,i,n,count:longint;
		A:array[1..111] of longint;
Begin
	Readln(n);
	For i:=1 to n do Read(A[i]);
	l:=1;
	count:=1;
	If not Odd(A[1]) then
		Begin
			Writeln('No');
			halt;
		End;

	For i:=1 to n do
		Begin
			If Odd(A[i]) and Odd(i-l+1) then r:=i;
		End;

	If (r<n) then
		Writeln('No')
	Else
		Writeln('Yes');
End.

program odds_and_ends;
var
        n, i: integer;
        a: array[1..200] of integer;
begin
        readln(n);
        for i:= 1 to n do
        read(a[i]);
        if (n mod 2 = 1) and (a[1] mod 2 = 1) and (a[n] mod 2 = 1) then write('Yes')
        else
        write('No');
        readln;
end.

var n , i : longint;
	    A : array [1..100] of longint;
begin
	read(n);
	for i := 1 to n do read(A[i]);
	if ((A[1] mod 2 = 1) and (A[n] mod 2 = 1) and (n mod 2 = 1)) then write('Yes') else write('No');
end.

var a:array[1..1000] of longint;
i,k:longint;
begin
read(k);
for i:=1 to k do
read(a[i]);
if ( k mod 2=1) and (a[1] mod 2=1) and (a[k] mod 2=1) then
write('Yes') else write('No')
end.

var n,i,j,k:longint;
    sh:array[1..10000] of longint;
begin
  read(n);
  for i:=1 to n do
    read(sh[i]);
  if n mod 2=0 then writeln('No')
  else
  if (sh[1] mod 2=0)or(sh[n] mod 2=0) then writeln('No')
  else
  if (sh[1] mod 2=1)and(sh[n] mod 2=1) then writeln('Yes');
end.

var
        n, i : integer;
        a : array [ 1..100 ] of integer;
begin
  readln( n );
  for i := 1 to n do
    read( a[ i ] );
  if ( a[ 1 ] mod 2 = 0 ) or ( a[ n ] mod 2 = 0 )
    then
      writeln( 'No' )
    else
      if ( n mod 2 = 1 )
        then writeln( 'Yes' )
        else writeln( 'No' );
end.

const fin='';
        fout='';
var f,g:Text;
        i,n,t,k:longint;
begin
        assign(f,fin);reset(F);
        assign(g,fout);rewrite(G);
        read(f,n);
        if n mod 2 =0 then write(g,'No')
        else
        begin
                for i:=1 to n do
                begin
                        read(f,t);
                        if i=1 then k:=t;
                end;
                if (k mod 2<>0) and (t mod 2<>0) then write(g,'Yes')
                else write(g,'No');
        end;
        close(F);
        close(G);
end.

var
n,m:longint;
a:array[1..100]of longint;
begin
readln(n);
for m:=1 to n do
read(a[m]);
if (a[1] mod 2=1) and
(a[n] mod 2=1) and (n mod 2=1)
then write('Yes') else
write('No'); end.

var
  n,i:longint;
  f:array[1..1000] of longint;
begin
  readln(n);
  for i:=1 to n do
  begin
    read(f[i]);
  end;
  if n mod 2=0 then
  begin
    write('No');
    exit;
  end;
  if f[1] mod 2=0 then
  begin
    write('No');
    exit;
  end;
  if f[n] mod 2=0 then
  begin
    write('NO');
    exit;
  end
  else write('Yes');
end.

var
   n,i,j:longint;
   a:array[1..10000] of longint;
begin
   readln (n);
   for i:=1 to n do read(a[i]);
   if (n mod 2<>0)and(a[1] mod 2<>0)and(a[n] mod 2<>0) then writeln ('YES') else
   begin
      writeln ('NO');
   end;
end.

var
    a:array[0..200] of longint;
    i,n:longint;
begin
    read(n);
    for i:=1 to n do read(a[i]);
    //if odd(n) and odd(a[1]) and odd(a[n]) then writeln('Yes')
    if odd(n*a[1]*a[n]) then writeln('Yes')
    else writeln('No');
end.

var n,i: integer; a: array[0..100] of longint;
begin
  readln(n);
  for i:=0 to n do read(a[i]);
  if ( n mod 2 =1 ) and (a[0] mod 2=1) and (a[n-1] mod 2=1) then write('YES') else write('NO');
end.

var n,i: integer; a: array[0..10100] of integer; begin readln(n); for i:=0 to n do read(a[i]); if  (a[0] mod 2=1) and (a[n-1] mod 2=1)  and (n mod 2=1) then write('YES') else write('NO'); end.

var i,j,k,t,s,n:longint;
	f:boolean;
	a,b:array[-5..500]of boolean;
    c:array[-5..500]of longint;
begin
	readln(n);
	for i:=1 to n do read(c[i]);
	//fillchar(a,sizeof(a),false);
	//fillchar(b,sizeof(b),false);
	if n mod 2=0 then begin writeln('No');exit;end;
	if odd(c[1]) then else begin writeln('No');exit;end;
	if odd(c[n]) then else begin writeln('No');exit;end;
	writeln('Yes');
	{if odd(c[1]) then begin
		if odd(c[2]) then b[1]:=true;//目前1种方案，且从偶数位开始为T
		a[0]:=true;//目前0种方案，且从奇数位开始为T
		for i:=2 to n-1 do if odd(c[i]) and odd(c[i+1]) then begin
			f:=false;
			if odd(i) then begin

				for j:=i downto 0 do
				if a[j] then begin
					b[j+1]:=true;
				end;
			end else begin
				for j:=i downto 0 do
				if b[j] then begin
					a[j+1]:=true;
				end;
			end;
		end;

		if odd(i) then begin
			for j:=i downto 0 do if j mod 2=0 then
			if a[j] then begin writeln('Yes');exit;end;
		end else begin
			for j:=i downto 0 do
			if b[j] then begin writeln('Yes');exit;end;
		end;
	end;
	writeln('No');}
end.

var
    n,i,j:longint;
    a:array[0..100] of longint;
    f:array[0..100,0..1] of boolean;
begin
    //assign(input,'input.txt'); reset(input);
    //assign(output,'output.txt'); rewrite(output);
    readln(n);
    for i:=1 to n do read(a[i]);
    fillchar(f,sizeof(f),false);
    f[0,0]:=true; a[0]:=1;
    for i:=1 to n do
        if odd(a[i]) then
            begin
                for j:=i - 1 downto 0 do
                    if odd(i - j) and odd(a[j]) and odd(a[j + 1]) then
                        begin
                            f[i,0]:=f[i,0] or f[j,1];
                            f[i,1]:=f[i,1] or f[j,0];
                        end;
            end;
    if f[n,1] then write('YES')
    else write('NO');
    //close(input); close(output);
end.

var n,i:longint;
    a:array[1..100] of longint;

begin
readln(n);
for i:=1 to n do read(a[i]);
IF n mod 2=0 then
   begin
   write('NO');
   halt;
   end;
IF(a[1] mod 2 = 0) or (a[n] mod 2 = 0 ) then
   begin
   write('NO');
   halt;
   end;
write('YES');
end.

var n,i:longint;
    a:array[1..100] of longint;

procedure xuli;
   begin
   IF(a[1] mod 2 = 0) or (a[n] mod 2 = 0 ) or (n mod 2=0)then
      begin
      write('NO');
      exit;
      end;
   write('YES');
   end;

begin
readln(n);
for i:=1 to n do read(a[i]);
xuli;
end.

const
        fin='431_a.inp';fon='431_a.out';
var a:array[1..1000] of boolean;i,j,n,k,l,e:longint;kq:boolean;
begin
//assign(input,fin);
//reset(input);
//assign(output,fon);
//rewrite(output);
readln(n);
for i:=1 to n do
        begin
        read(l);
        if l mod 2=1 then a[i]:=true;
        end;
if (a[1]=true)and(a[n]=true)and(n mod 2=1) then writeln('YES')
else writeln('NO');
close(input);close(output);
end.

const fi='431A.inp';
      fo='431A.out';
var n,i:longint;
    a:array[0..1000005] of longint;
procedure mo;
begin
    assign(input,fi);
    reset(input);
    assign(output,fo);
    rewrite(output);
end;

begin

    readln(n);
    for i:=1 to n do
        read(a[i]);
    if (a[1] mod 2 <> 0) and(a[n] mod 2 <> 0) then
    begin
        if n mod 2 <> 0 then
            writeln('YES')
        else
            writeln('NO');
    end
    else
        writeln('NO');
end.

var n,i,dem:longint;
a:array[0..105] of longint;
procedure       mo;
begin
        assign(input,'test.inp');reset(input);
        assign(output,'test.out');rewrite(output);
end;
procedure       dong;
begin
        close(input);close(output);
end;
procedure       nhap;
begin
        readln(n);
        for i:=1 to n do
                begin
                read(a[i]);
                if a[i] mod 2=0 then inc(dem);
                end;
end;
procedure       xuli;
begin
        if (a[1] mod 2=0) or (a[n] mod 2=0) then
                begin
                writeln('NO');
                halt;
                end;
        if n mod 2<>0 then
                begin
                writeln('YES');
                halt;
                end;
        //if dem=0 then writeln('NO') else writeln('YES');
        write('NO');
end;
begin
       // mo;
        nhap;
        xuli;
        //dong;
end.

var a: Array [1..100] of LongInt;
    n, i: LongInt;

begin

  readln (n);
  for i := 1 to n do begin
    read (a[i]);
  end;

  if (n mod 2 = 1) and (a[1] mod 2 = 1) and (a[n] mod 2 = 1) then
    writeln ('Yes')
  else
    writeln ('No');

end.

var
n,i:integer;
a:array[1..100]of integer;
begin
readln(n);
for i:= 1 to n do
read(a[i]);
if n mod 2 = 0 then begin writeln('NO');exit;end;
if a[1] mod 2 = 0 then begin writeln('NO');exit;end
else if a[n] mod 2 = 0 then writeln('NO')
else writeln('YES');
end.

var n,i,j,kount:byte;
        a:array[0..100] of byte;
begin
 readln(n);
 for n:=1 to n do read(a[n]);
 i:=1;//kount:=0;
 repeat
 if a[i] mod 2 =0 then begin write('No'); halt; end;
 for j:=n downto i-1 do if (a[j] mod 2<>0) and ((j-i+1) mod 2 <>0) then break;
 if j=i-1 then begin write('No'); halt; end
 else begin i:=j+1; inc(kount); end;
 until i>n;
 if kount mod 2 <>0 then write('Yes') else write('No');
end.

var n,i:longint ;
       a:array[1..10000] of longint ;
begin
   readln(n) ;
	 for i:=1 to n do
	 read(a[i]) ;
	 if n mod 2=0 then writeln('No')
	 else
	   if (a[n] mod 2=1) and (a[1] mod 2=1) then writeln('Yes')
		 else writeln('No') ;
end.

Var     a:array[1..100] of Longint;
        n,i:longint;
Procedure Print(i:integer);
Begin
        If i=0 Then Write('No') Else Write('Yes');
        Halt;
End;
Begin
        Readln(n);
        For i:=1 to n do Read(a[i]);
        If n and 1=0 Then Print(0);
        If (a[1] and 1=0) or (a[n] and 1=0) Then Print(0);
        Print(1);
End.

var
    a:array[0..200] of longint;
    i,n:longint;
begin
    read(n);
    for i:=1 to n do read(a[i]);
    if (n*a[1]*a[n]) mod 2=1 then writeln('Yes')
    else writeln('No');
end.

var
  a:array[1..100]of integer;
  n,i:integer;
begin
  readln(n);
  for i:=1 to n do
    read(a[i]);
  if (n mod 2=1)and(a[1]mod 2=1)and(a[n]mod 2=1) then writeln('Yes')
    else writeln('No');
  readln;
end.

const fi='849A.inp';
        fo='849A.out';
var a:array[0..101] of longint;
        f:array[0..101,0..101,1..2] of boolean;
        n,i,j:longint;
procedure ran;
        var i:longint;
        begin
                readln(n);
                for i:=1 to n do read(a[i]);
        end;
procedure conan(u,v:longint);
        var i:longint;
        begin
                if (a[u] mod 2=0) or (a[v] mod 2=0) then exit;
                if (v-u) mod 2 =0 then
                        begin
                        f[u,v,1]:=true;
                        if u=v then exit;
                        end;
                for i:=u to v do
                        begin
                                if (f[u,i,2]) and (f[i+1,v,2]) then f[u,v,2]:=true;
                                if (f[u,i,1]) and (f[i+1,v,1]) then f[u,v,2]:=true;
                        end;
                for i:=u to v do
                        begin
                                if (f[u,i,2]) and (f[i+1,v,1]) then f[u,v,1]:=true;
                                if (f[u,i,1]) and (f[i+1,v,2]) then f[u,v,1]:=true;
                        end;
        end;
begin
{assign(input,fi);
reset(input);
assign(output,fo);
rewrite(output);}
        ran;
        for i:=n downto 1 do
        for j:=i to n do conan(i,j);
        if f[1,n,1] then writeln('Yes') else writeln('No');
end.

   const nn=1600000; nnn=1200000;eps=0.0000000001;
   label 1,2,3;
    var    k,step, i,j:longint;
    jj,ii,p3,p4, p1,p2,t1,t2,p,ost,q,n,ot,t,kk:int64;
     pal:array[-20..6000,-20..6000] of boolean;
     pp:extended;
      zz,z,c,d,x,y,a,b:array[-1002..2000000] of int64;
      ddnew,ddold:array[0..200,0..4040] of integer;
     per,dda,ddb:array[-10..120,-10..120] of int64;
        ss:string;

           flagg,flag,flag1:boolean;

  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);
     }

    read(n);  for i:=1 to n do read(a[i]);
    if odd(a[1])and odd(a[n]) then write('YES') else write('NO');

   1:          close(output);
end.

const fi='';
      fo='';
var  n,m,i,j,k,kq:longint;
     a:array[1..1000000] of longint;

procedure openf;
begin
     assign(input,fi);  assign(output,fo);
     reset(input);  rewrite(output);
end;

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

procedure inkq;
begin
     readln(n);
     for i:=1 to n do read(a[i]);
     if (a[1] mod 2=0) or (a[n] mod 2=0) then begin writeln('No'); exit; end;
     k:=1;    kq:=0;
     for i:=1 to n do if (a[i] mod 2=1) then
     begin
           if k=0 then begin k:=i; continue; end;
           if i-k mod 2=0 then begin k:=0;  inc(kq); end;
     end;
     if (kq mod 2=1) or (n=1) then write('Yes') else write('No');
     //
end;

BEGIN
     openf;
     inkq;
     closef;
END.

const fi='';
      fo='';
var  n,m,i,j,k,kq:longint;
     a:array[1..1000000] of longint;

procedure openf;
begin
     assign(input,fi);  assign(output,fo);
     reset(input);  rewrite(output);
end;

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

procedure inkq;
begin
     readln(n);
     for i:=1 to n do read(a[i]);
     if (a[1] mod 2=0) or (a[n] mod 2=0) then begin writeln('No'); exit; end;
     k:=1;    kq:=0;
     for i:=1 to n do if (a[i] mod 2=1) then
     begin
           if k=0 then begin k:=i; continue; end;
           if i-k mod 2=0 then begin k:=0;  inc(kq); end;
     end;
     if (kq mod 2=1) and (k=0) then write('Yes') else write('No');

end;

BEGIN
     openf;
     inkq;
     closef;
END.

const fi='';
      fo='';
var  n,m,i,j,k,kq:longint;
     a:array[1..1000000] of longint;

procedure openf;
begin
     assign(input,fi);  assign(output,fo);
     reset(input);  rewrite(output);
end;

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

procedure inkq;
begin
     readln(n);
     for i:=1 to n do read(a[i]);
     if (a[1] mod 2=0) or (a[n] mod 2=0) then begin writeln('No'); exit; end;
     k:=1;    kq:=0;
     for i:=1 to n do if (a[i] mod 2=1) then
     begin
           if k=0 then begin k:=i; continue; end;
           if i-k mod 2=0 then begin k:=0;  inc(kq); end;
     end;
     if (kq mod 2=1) or (n=1) then write('Yes') else write('No');
     write(kq);
end;

BEGIN
     openf;
     inkq;
     closef;
END.

const fi='';
      fo='';
var  n,m,i,j,k,kq:longint;
     a:array[1..1000000] of longint;

procedure openf;
begin
     assign(input,fi);  assign(output,fo);
     reset(input);  rewrite(output);
end;

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

procedure inkq;
begin
     readln(n);
     for i:=1 to n do read(a[i]);
     if (a[1] mod 2=0) or (a[n] mod 2=0) then begin writeln('No'); exit; end;
     k:=1;    kq:=0;
     for i:=1 to n do if (a[i] mod 2=1) then
     begin
           if k=0 then begin k:=i; continue; end;
           if i-k mod 2=0 then begin k:=0;  inc(kq); end;
     end;
     if (kq mod 2=1) or (n=1) then write('Yes') else write('No');

end;

BEGIN
     openf;
     inkq;
     closef;
END.

program z1;
var n,i:integer; a:array[1..100]of integer;
begin
read(n);
for i:=1 to n do
read(a[i]);
if (a[n] mod 2=0)or(a[1]<>0)or(n mod 2=0) then write('NO')
else write('Yes');
end.

program z1;
var n,i:integer; a:array[1..100]of integer;
begin
read(n);
for i:=1 to n do
read(a[i]);
if (a[n] mod 2=0)or(a[1] mod 2<>0)or(n mod 2=0) then write('NO')
else write('Yes');
end.

var
n,m,p,l:longint;
a:array[1..100]of longint;
begin
readln(n);
for m:=1 to n do
read(a[m]);
if (a[1] mod 2=0)
or (a[n] mod 2=0)
then begin write('No');
halt; end;
if (a[n] mod 2=1) and
(a[1] mod 2=1) and (n mod 2=1)
then begin write('Yes');
halt; end;
for m:=2 to n do
if (a[m] mod 2=1)
and (a[m-1] mod 2=1)
then inc(p);
if p mod 2=1 then
begin write('No');
halt; end;

p:=0; l:=0;
for m:=2 to n do
if (a[m-1] mod 2=1) and
(a[m] mod 2=1) and
((m-1-p) mod 2=1)
then begin p:=m-1;
inc(l); end;
if l mod 2=1 then write('Yes')
else write('No'); end.

var n,i: integer; a: array[0..100] of longint;
begin
  readln(n);
  for i:=1 to n do
  if ( n mod i =1 ) and (a[0] mod i=1) and (a[n-1] mod i=1) then write('YES') else write('NO');
end.

var n,i: integer; a: array[0..100] of longint;
begin
  readln(n);
  for i:=1 to n do
  if ( n mod 2 =1 ) and (a[0] mod 2=1) and (a[n-1] mod 2=1) then write('YES'); write('NO');
end.

var n,i: integer; a: array[0..10100] of integer; begin readln(n); for i:=0 to n do read(a[i]); if (n mod 2=0) and (a[0] mod 2=0) and (a[n-1] mod 2=0) then write('YES') else write('NO'); end.

var n,i: integer; a: array[0..10100] of integer; begin readln(n); for i:=0 to n do read(a[i]); if  (a[0] mod 2=0) or (a[n-1] mod 2=0)  and (n mod 2=0) then write('NO') else write('YES'); end.

var n,i: integer; a: array[0..100] of longint;
begin
  readln(n);
  for i:=0 to n do read(a[i]);
  if ( n mod 2 =1 ) and (a[0] mod 2=1) and (a[n-1] mod 2=1) then write('YES'); write('NO');
end.

var n,i: integer; a: array[0..100] of longint;
begin
  readln(n);
  for i:=0 to n do
  if ( n mod 2 =1 ) and (a[0] mod 2=1) and (a[n-1] mod 2=1) then write('YES'); write('NO');
end.

var n,i: integer; a: array[0..10100] of integer; begin readln(n); for i:=0 to n do read(a[i]); if (n mod 2=0) and (a[0] mod 2=0) and (a[n-1] mod 2=0) then write('NO') else write('YES'); end.

var n,i: integer; a: array[0..100] of longint;
begin
  readln(n);
  for i:=1 to n do
  if ( n mod i =1 ) and (a[0] mod i=1) and (a[n-1] mod i=1) then write('YES');write('NO');
end.

var n,i: integer; a: array[0..10100] of integer; begin readln(n); for i:=0 to n do read(a[i]); if  (a[0] mod 2=0) or (a[n-1] mod 2=0)  and (n mod 2=0) then write('YES') else write('NO'); end.

var i,j,k,t,s,n:longint;
f:boolean;
	a,b:array[-5..500]of boolean;
        c:array[-5..500]of longint;
begin
	readln(n);
	for i:=1 to n do read(c[i]);
	if n mod 2=0 then begin writeln('No');exit;end;
	if odd(c[1]) then begin
		b[1]:=true;//目前1种方案，且从偶数位开始为T
		a[0]:=true;//目前0种方案，且从奇数位开始为T
		for i:=2 to n do if odd(c[i]) then begin
			f:=false;
			if odd(i) then begin

				for j:=i+1 downto 0 do
				if a[j] then begin
					b[j+1]:=true;f:=true;// writeln(j+1);
					if i=n then if odd(j+1) then
						begin writeln('Yes');exit;end;
				end;
			end else begin

				for j:=i+1 downto 0 do
				if b[j] then begin
					a[j+1]:=true;f:=true;//  writeln(j+1);
					if i=n then if odd(j+1) then
						begin writeln('Yes');exit;end;
				end;
			end;
			if f then else begin writeln('No');exit;end;
		end;
	end;
	writeln('No');
end.

var
n,i:integer;
a:array[1..100]of integer;
begin
readln(n);
for i:= 1 to n do
read(a[i]);
if a[1] mod 2 = 0 then writeln('NO')
else if n mod 2 = 0 then writeln('NO')
else writeln('YES');
end.

var
n,i,k:integer;
a:array[1..100]of integer;
begin
readln(n);
if n mod 2 = 0 then writeln('NO')
else for i:= 1 to n do
if a[i]mod 2 <>0 then inc(k);
if k mod 2 <>0 then writeln('YES')
else writeln('NO');
end.

var
n,i,k:integer;
a:array[1..100]of integer;
begin
readln(n);
if n mod 2 = 0 then writeln('NO')
else for i:= 1 to n do begin
read(a[i]);
if a[i]mod 2 <>0 then inc(k);
end;
if k mod 2 <>0 then writeln('YES')
else writeln('NO');
end.

var n,i,j:byte;
        a:array[0..100] of byte;
begin
 readln(n);
 for n:=1 to n do read(a[n]);
 i:=1;
 repeat
 if a[i] mod 2 =0 then begin write('No'); halt; end;
 for j:=n downto i-1 do if (a[j] mod 2<>0) and ((j-i+1) mod 2 <>0) then break;
 if j=i-1 then begin write('No'); halt; end
 else i:=j+1;
 until i>n;
 write('Yes');
end.

program asd;
const   finput='849_A.inp';
        foutput='849_A.out';
        Maxn=100;
var     a,x:array[0..Maxn*MAxN] of longint;
        n:longint;

Procedure Nhap;
var i:longint;
begin
    //assign(input,finput);reset(input);
    //assign(output,foutput);rewrite(output);
    read(n);
    for i:=1 to n do
        read(a[i]);
end;

Procedure Vet(i:longint);
var j:longint;
begin
    if i>n then exit;
    for j:=x[i-1]+1 to n+1 do
        if (a[j-1] mod 2<>0)and(a[j] mod 2<>0)and((j-1-x[i-1]+1) mod 2<>0) then
            begin
            x[i]:=j;
            if ((n-x[i]+1) mod 2<>0)and(i mod 2<>0) then
                begin
                write('Yes');
                halt;
                end;
            Vet(i+1);
            end;
end;

Procedure Xuli;
begin
    if (a[1] mod 2<>0)and(a[n] mod 2<>0) then
        begin
        a[n+1]:=1;
        x[1]:=1;
        Vet(2);
        write('No');
        end
    else
        begin
        write('No');
        halt;
        end;
end;
begin
    Nhap;
    Xuli;
end.