//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <queue>

using namespace std;

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);
const int INF = 10000000;

int dx[2][6] = {
  {0,1,1,0,-1,-1},
  {0,1,1,0,-1,-1}
};
int dy[2][6] = {
  {1,0,-1,-1,-1,0},
  {1,1,0,-1,0,1}
};

struct Edge{
  int to, cost;

  Edge(int t, int c): to(t), cost(c)
  {}
  bool operator>(const Edge& rhs) const{
	return cost > rhs.cost;
  }
};
typedef vector< vector<Edge> > Graph;


int idx(int y, int x, int t){
  return ((y+100)*210 + (x+100))*6 + t;
}

void Dijkstra(const Graph& edges, vector<int>& d, int s){
  priority_queue<PII, vector<PII>, greater<PII> > pq;
  fill(d.begin(), d.end(), INF);
  d[s] = 0;
  pq.push(MP(0,s));

  while(!pq.empty()){
	PII pii = pq.top(); pq.pop();
	int v = pii.second;
	if(d[v] < pii.first) continue;
	for(int i=0;i<edges[v].size();++i){
	  const Edge& e = edges[v][i];
	  if(d[e.to] > d[v] + e.cost){
		d[e.to] = d[v] + e.cost;
		pq.push(MP(d[e.to], e.to));
	  }
	}
  }
}


int main(){
  cin.tie(0);
  ios_base::sync_with_stdio(false);

  int sx, sy, gx, gy, n, lx, ly;
  cin >> sx >> sy >> gx >> gy >> n;

  bool ok[201][201];
  fill((bool*)ok, (bool*)ok+201*201, true);
  REP(i,n){
	int x, y; cin >> x >> y;
	ok[y+100][x+100] = false;
  }
  cin >> lx >> ly;

  Graph G(210*210*10);
  for(int y=-ly;y<=ly;++y)
	for(int x=-lx;x<=lx;++x)
	  for(int t=0;t<6;++t){
		int dir = abs(x*y*t)%6;
		REP(i,6){
		  int tx = x + dx[abs(x)%2][i];
		  int ty = y + dy[abs(x)%2][i];
		  if(abs(tx) > lx || abs(ty) > ly || !ok[ty+100][tx+100]) continue;
		  G[idx(y,x,t)].PB(Edge(idx(ty,tx,(t+1)%6), i!=dir));
		}
		G[idx(y,x,t)].PB(Edge(idx(y,x,(t+1)%6), 1));		
	  }
  VI dist(210*210*10);
  Dijkstra(G, dist, idx(sy,sx,0));
  int ans = INF;
  REP(i,6)
	ans = min(ans, dist[idx(gy,gx,i)]);

  cout << (ans>=INF? -1: ans) << endl;
  
  return 0;
}