#include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
const ll INF = (ll)1000000007 * 1000000007;
const double EPS = 1e-9;
typedef pair<int, int> P;
typedef unsigned int ui;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef long double ld;
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
int d1[6] = { 0,1,1,0,-1,-1 };
int d2[6] = { 1,0,-1,-1,-1,0 };
int d3[6] = { 1,1,0,-1,0,1 };
struct edge { int to, cost; };
vector<edge> G[300000];
int d[300000];
void dijkstra(int s) {
	priority_queue<P, vector<P>, greater<P>>que;
	fill(d, d + 300000, (int)MOD);
	d[s] = 0;
	que.push(P(0, s));
	while (!que.empty()) {
		P p = que.top(); que.pop();
		int v = p.second;
		if (d[v] < p.first)continue;
		for (int i = 0; i < (int)G[v].size(); i++) {
			edge e = G[v][i];
			if (d[e.to] > d[v] + e.cost) {
				d[e.to] = d[v] + e.cost;
				que.push(P(d[e.to], e.to));
			}
		}
	}
}
int main() {
	int room[203][203] = {};
	int sx, sy, gx, gy; cin >> sx >> sy >> gx >> gy; sx += 101; sy += 101; gx += 101; gy += 101;
	int sta = sx + sy * 203; int goal = gx + gy * 203;
	int n; cin >> n;
	rep(i, n) {
		int x, y; cin >> x >> y; x += 101; y += 101; room[x][y] = 1;
	}
	int lx, ly; cin >> lx >> ly;
	rep(i, 203) {
		rep(j, 203) {
			if (i < 101 - lx || j < 101-ly || i > 101 + lx || j > 101 + ly) {
				room[i][j] = 1;
			}
		}
	}
	rep(i, 203 * 203 * 6) {
		int x = i % 203;
		int y = (i / 203) % 203;
		int z = (i / (203 * 203)) % 6;
		if (room[x][y])continue;
		int ord = abs((x - 101)*(y - 101)*z)% 6;
		G[i].push_back({ (i + 203 * 203) % (203 * 203 * 6),1 });
		rep(k, 6) {
			int nx = x + d1[k];
			int ny;
			if (x % 2) {
				ny = y + d2[k];
			}
			else {
				ny = y + d3[k];
			}
			if (room[nx][ny])continue;
			int ver = nx + ny * 203 + ((z+1)%6) * 203 * 203;
			if (k == ord) {
				G[i].push_back({ ver, 0 });
			}
			else {
				G[i].push_back({ ver,1 });
			}
		}
	}
	dijkstra(sta);
	int mi = (int)MOD;
	rep(i, 6) {
		mi = min(mi, d[goal + 203 * 203 * i]);
	}
	if (mi == (int)MOD) {
		cout << -1 << endl;
	}
	else {
		cout << mi << endl;
	}
	return 0;
}
