Program pr1;
const n=19;
var i, l: integer;
Dat: array [1..n] of integer;
New: array [1..n] of integer;
begin
write('Dat: ');
for i:=1 to n do begin
Dat[i]:=random(30)-15;
write(Dat[i],' ');
end;
writeln();
write('New: ');
l:=0;
for i:=1 to n do if (Dat[i]>=0) and (Dat[i] mod 8<>0) then begin
l:=l+1;
New[l]:=Dat[i];
end;
for i:=1 to l do write(New[i],' ');
end.