{$A+,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O+,P+,Q-,R+54,S-,T-,U-,V+,W-,X+,Y+,Z1}
{$MINSTACKSIZE $00004000}
{$MAXSTACKSIZE $00100000}
{$IMAGEBASE $00400000}
program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  x,y:array[1..100000,1..4]of integer;
  x1,y1,x2,y2,k,dx,dy,i,len,kolx,koly,min,j,t,z:integer;
  l,c,a:array[1..4]of integer;
  bool:boolean;
begin
  assign(input,'input.txt');
  reset(input);
  assign(output,'output.txt');
  Rewrite(Output);

  read(x1,y1,x2,y2,k);
  dx:=abs(x1-x2);
  dy:=abs(y1-y2);
  for i:=1 to k do
    read(l[i]);
  for i:=1 to k do
    read(c[i]);
  for i:=1 to k do
    a[i]:=-c[i];
  while true do begin
    inc(a[1]);
    for i:=2 to k do
      if a[i-1]>c[i-1] then begin
        inc(a[i]);
        a[i-1]:=-c[i-1];
      end;
    if a[k]>c[k] then break;
    len:=0;
    for i:=1 to k do
      inc(len,a[i]*l[i]);
    if len=dx then begin
      inc(kolx);
      for i:=1 to k do
        x[kolx,i]:=a[i];
    end;
    if len=dy then begin
      inc(koly);
      for i:=1 to k do
        y[koly,i]:=a[i];
    end;
  end;
  min:=1000000;
  for i:=1 to kolx do
    for j:=1 to koly do begin
      bool:=false;
      t:=0;
      for z:=1 to k do begin
        inc(t,abs(x[i,z]));
        inc(t,abs(y[j,z]));
        if abs(x[i,z])+abs(y[j,z])>c[z] then begin bool:=true;break;end;
      end;
      if bool then continue;
      if min>t then min:=t;
    end;

  if min=1000000 then writeln(-1) else writeln(min);
  Close(Input);
  Close(Output);
end.
