#include "bits/stdc++.h"
using namespace std;
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2425&lang=jp
typedef long long ll;
#define INF 1<<30
#define MAXL 256
#define CENTER 128
int d[MAXL][MAXL][6];
bool masu[MAXL][MAXL];
int dx[7] = { 0,1,1,0,-1,-1,0 };
int dy1[7] = { 1,0,-1,-1,-1,0,0 };
int dy2[7] = { 1,1,0,-1,0,1,0 };
void init(int lx, int ly) {
	for (int i = -ly - 1; i <= ly + 1;i++) {
		masu[CENTER + lx + 1][CENTER + i] = true;
		masu[CENTER - lx - 1][CENTER + i] = true;
	}
	for (int i = -lx - 1; i <= lx + 1;i++) {
		masu[CENTER + i][CENTER + ly + 1] = true;
		masu[CENTER + i][CENTER - ly - 1] = true;
	}

	for (int i = 0; i < MAXL; i++) {
		for (int j = 0; j < MAXL;j++) {
			for (int k = 0; k < 6;k++) {
				d[i][j][k] = INF;
			}
		}
	}
}
int main() {
	cin.tie(0); ios::sync_with_stdio(false);
	int sx, sy, gx, gy; cin >> sx >> sy >> gx >> gy;
	sx += CENTER; sy += CENTER; gx += CENTER; gy += CENTER;
	int n; cin >> n;
	for (int i = 0; i < n;i++) {
		int x, y; cin >> x >> y;
		masu[CENTER + x][CENTER + y] = true;
	}
	int lx, ly; cin >> lx >> ly;
	init(lx, ly);

	/*                 x    y    t   */
	using Key = tuple<int, int, int>;
	d[sx][sy][0] = 0;
	queue<Key> q; q.push(Key(sx,sy, 0));
	while (!q.empty()) {
		int x, y, t; tie(x, y, t) = q.front(); q.pop();
		int dir = abs((x - CENTER)*(y - CENTER)*t) % 6;
		int nx, ny;
		int nt = t + 1;
		for (int i = 0; i < 7;i++) {
			nx = x + dx[i];
			if (x % 2 == 0) { ny = y + dy1[i]; }
			else { ny = y + dy2[i]; }

			int cost = 1;
			if (masu[nx][ny])continue;
			
			if (i == dir) cost = 0;
			if (d[nx][ny][nt % 6] > d[x][y][t % 6] + cost) {
				d[nx][ny][nt % 6] = d[x][y][t % 6] + cost;
				if (nx == gx && ny == gy) continue;
				q.push(Key(nx, ny, nt));
			}
		}
	}
	int ans = INF;
	for (int i = 0; i < 6;i++) {
		ans = min(ans, d[gx][gy][i]);
	}
	cout << (ans == INF ? -1 : ans) << endl;
	return 0;
}