#include <bits/stdc++.h>
#define INF 1e9
using namespace std;
struct dat{int x,y,t;};
const int Base = 250;
int sx,sy,gx,gy;
int mp[501][501];
int lx,ly;
int dx[7]={0,1,1,0,-1,-1,0};
int dy[2][7]={{1,0,-1,-1,-1,0,0},{1,1,0,-1,0,1,0}};
int D[501][501][6];

bool onmp(int x,int y){return abs(x-Base)<=lx&&abs(y-Base)<=ly;}

int bfs(){

  for(int i=0;i<501;i++)
    for(int j=0;j<501;j++) 
      for(int k=0;k<6;k++) D[i][j][k] = INF;
  
  
  deque<dat> Q;
  Q.push_front((dat){sx,sy,0});
  D[sy][sx][0] = 0;

  while(!Q.empty()){

    dat p = Q.front();Q.pop_front();
    int x = p.x,y = p.y,t = p.t;

    int cost = D[y][x][t];
    int I = abs((x-Base)*(y-Base)*t)%6;

    if(x==gx&&y==gy) return cost;

    for(int i=0;i<7;i++){
      int nx = x+dx[i];
      int ny = y+dy[x%2][i];
      int nt = (t+1)%6;
      int ncost = cost+(i!=I);
      if(!onmp(nx,ny)||mp[ny][nx]||D[ny][nx][nt]<=ncost)continue;
      if(i!=I)Q.push_back((dat){nx,ny,nt});
      else Q.push_front((dat){nx,ny,nt});
      D[ny][nx][nt] = ncost;
    }
  }
  return -1;
}
  

int main(){
  cin>>sx>>sy>>gx>>gy;
  sx+=Base,sy+=Base;
  gx+=Base,gy+=Base;

  int n;
  cin>>n;
  for(int i=0,x,y;i<n;i++) cin>>x>>y,mp[y+Base][x+Base] = 1;
  cin>>lx>>ly;
  cout<<bfs()<<endl;
  return 0;
}