uses crt;
var a:array[1..100]of integer;
i,n,ln:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
for i:=1 to n do if (a[i] mod 2=0) then write(a[i]:4);
writeln;
ln:=a[1];
for i:=1 to n do
if ln<a[i] then ln:=a[i];
writeln(ln);
readln;
end.