var
file1,file2:text;
i,j,m,x1,x2,y1,y2,s,t:integer;
c:array[1..4] of byte;
l:array[1..4] of integer;
begin
clrscr;
assign(file1,'input1.txt');
reset(file1);
read(file1,x1,y1,x2,y2,k);
for i:=1 to k do
read(file1,l[i]);
for i:=1 to k do
read(file1,c[i]);
close(file1);
t:=sqr(x1-x2)+sqr(y1-y2)
for m:=1 to k do

end.