Var n:integer; r:array[1..20] of integer; begin for n:=1 to 20 do begin readln(r[n]); end; for n:=1 to 20 do begin if (r[n] mod 2=0) and (r[n] mod 3=0) then write(r[n],' '); end; end.