program Project1;

{$APPTYPE CONSOLE}
var
  inf, outf:text;
  x1, y1, x2, y2, k : Integer;
  L , C : array[1..4]of Integer;
  ind : Integer;
  minCS : Integer;
  C1, C2, C3, C4 : Integer;

begin
  assign(inf, 'Input.txt');
  assign(outf, 'Output.txt');
  reset(inf);
  rewrite(outf);
  read(inf,x1,y1,x2,y2,k);
  for ind:=1 to k do
  begin
    read(inf,L[ind]);
  end;
  for ind:=1 to k do
  begin
    read(inf,C[ind]);
  end;
  case k of
   1:
   begin
   end;
   2:
   begin
   end;
   3:
   begin
   end;
   4:
   begin
     for c1:=-c[1] to c[1] do
     begin
     for c1:=-c[1] to c[1] do
     begin
     for c1:=-c[1] to c[1] do
     begin
     for c1:=-c[1] to c[1] do
     begin

     end;

     end;

     end;

     end;
   end;
  end;
  close(inf);
  close(outf);
end.
