program z;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
   TPt=record
      x:integer;
      y:integer;
   end;
   mar=array[1..4] of integer;

var
   sp, ep: tPt;
   rml, rmc, ml, mc: mar;
   k, l, i, min:integer;
   fi, fo: text;
   flag: boolean;


function recur(sp: TPt; dp, lp: integer; rmc: mar; var l: integer): boolean;
var
   trmc: mar;
   minl: integer;
   flag: boolean;
   tp: TPt;
   i, j, iml, imc, lt: integer;
begin
   minl:=100;
   for iml:=1 to k do begin
      if rmc[iml]>0 then begin
//      for imc:=1 to rmc[iml] do begin
         for i:=1 to 4 do begin
{            if (((i=1) and (dp=3)) or
               ((i=2) and (dp=4)) or
               ((i=3) and (dp=1)) or
               ((i=4) and (dp=2))) and (rmc[iml]=lp) then continue;
 }
            tp:=sp;
            case i of
               1: tp.y:=tp.y+ml[iml];
               2: tp.x:=tp.x+ml[iml];
               3: tp.y:=tp.y-ml[iml];
               4: tp.x:=tp.x-ml[iml];

            end;
            if (tp.x=ep.x) and (tp.y=ep.y) then begin l:=1; recur:=true; exit; end;
            for j:=1 to k do trmc[j]:=rmc[j];
            dec (trmc[iml]);
            lt:=0;
            flag:=recur(tp, i, rmc[iml], trmc, lt);
            if flag then
               if lt<minl then minl:=lt;


         end;
      end;
   end;

   if minl=100 then begin l:=0; recur:=false; end
   else begin l:=minl+1; recur:=true; end;



end;





begin
   assign(Fi,'input.txt');
   assign(Fo,'output.txt');
   reset(fi);
   read(fi, sp.x, sp.y, ep.x, ep.y, k);

   min:=1000;
   for i:=1 to k do begin
      read(fi, ml[i]);
      if ml[i]<min then min:=ml[i];
   end;

   for i:=1 to k do read(fi, mc[i]);
   close(fi);


   flag:=true;
//   if (abs(ep.x-sp.x)<min) and (abs(ep.y-sp.y)<min) then
//      flag:=false;


   if flag then begin
      l:=0;
      flag:=recur(sp, 0, 0, mc, l);
   end;
   if not flag then l:=-1;

   rewrite(fo);
   writeln(fo, l);
   close(fo);
end.
