#include <iostream>
#include <vector>
#include <cstring>
#include <set>
#include <tuple>
#include <queue>
#include <map>

using namespace std;

int dx[][7] = {
	{ 0, 1, 1, 0, -1, -1 }, // even
	{ 0, 1, 1, 0, -1, -1 }, // odd
};

int dy[][7] = {
	{ 1, 0, -1, -1, -1, 0 }, // even
	{ 1, 1, 0, -1, 0, 1 },  // odd
};

const int N = 110;

int dist[N * 3][N * 3][6];
int obj[N * 3][N * 3];

int main(){
	int sx, sy, gx, gy;
	cin >> sx >> sy >> gx >> gy;
	sx += N, sy += N, gx += N, gy += N;
	int n;
	cin >> n;
	for (int i = 0; i < n; ++i){
		int x, y;
		cin >> x >> y;
		obj[x + N][y + N] = 1;
	}
	int lx, ly;
	cin >> lx >> ly;

	priority_queue<tuple<int, int, int, int>> q;
	q.emplace(0, sx, sy, 0);
	memset(dist, -1, sizeof(dist));
	dist[sx][sy][0] = 0;
	int ans = -1;
	while (!q.empty()){
		int d, x, y, t;
		tie(d, x, y, t) = q.top();
		d = -d;
		q.pop();

		if (dist[x][y][t] < d) continue;
		if (x == gx && y == gy){
			ans = d;
			break;
		}

		for (int i = 0; i < 7; ++i){
			int nx = x + dx[x & 1][i], ny = y + dy[x & 1][i], nt = (t + 1) % 6;
			int nd = d + (i != abs((x-N)*(y-N)*t%6));
			if (nx - N < -lx || nx - N > lx || ny - N < -ly || ny - N > ly) continue;
			if (obj[nx][ny]) continue;
			if (dist[nx][ny][nt] >= 0 && dist[nx][ny][nt] <= nd) continue;
			dist[nx][ny][nt] = nd;
			q.emplace(-nd, nx, ny, nt);
		}
	}
	cout << ans << endl;

	return 0;
}