uses crt;
type mang=array[1..100]of integer;
var a:mang;
n,i,t,k,kt:integer;
{------------------ham-kiem-tra------------------------}
function ktra(x:integer):boolean;
begin
ktra:=false;
for i:=1 to n do
if a[i]=x then ktra:=true;
end;
{-------------------chuong-trinh-chinh----------------}
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
t:=0;
for i:=1 to n do
if a[i] mod 2=0 then t:=t+a[i];
writeln('Tong cac so chan la: ',t);
write('Nhap k='); readln(k);
if ktra(k)=true then writeln('YES')
else writeln('NO');
readln;
end.