#include <iostream>
#include <algorithm>
#include <cstdio>
#include <string>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <cassert>
using namespace std;

#define REP(i, s, e) for (int i = (s); i < (e); i++)
#define REPI(i, s, e) for (int i = (s); i <= (e); i++)
#define rep(i, n) REP(i, 0, n)
#define repi(i, n) REPI(i, 0, n)
#define ALL(v) (v).begin(), (v).end()

#define dump(x) (cout << #x << " = " << x << endl)
#define dump2(x, y) (cout << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")" << endl)
#define dump3(x, y, z) (cout << "(" << #x << ", " << #y << ", " << #z << ") = (" << x << ", " << y << ", "<< z << ")" << endl)

typedef long long ll;
typedef pair<int, int> pii;

int sx, sy, gx, gy;
int n;
vector<int> xs, ys;
int lx, ly;

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

#define INF (1<<29)

#define MAX 300
#define OFFSET 150
int brd[MAX][MAX];

int dist[MAX][MAX][6];

class node
{
public:
	int x, y, t;
	node(){}
	node(int x, int y, int t):x(x), y(y), t(t) {}

	bool operator<(const node& r) const {
		return dist[x][y][t] > dist[r.x][r.y][r.t];
	}
};

int dijkstra()
{
	rep(i, MAX) rep(j, MAX) rep(k, 6) dist[i][j][k] = INF;

	priority_queue<node> que;
	dist[sx][sy][0] = 0;
	que.push(node(sx, sy, 0));

	while (!que.empty()) {
		node n = que.top(); que.pop();
		int x = n.x, y = n.y, t = n.t;

		rep(i, 6) {
			int nx = x+dx[i], ny = y+dy[x%2][i];
			if (brd[nx][ny]) continue;
			if (!(abs(x-OFFSET) <= lx)) continue;
			if (!(abs(y-OFFSET) <= ly)) continue;
			int nt = (t + 1)%6;

			int direction = abs((x-OFFSET)*(y-OFFSET)*t)%6;
			int dd = dist[x][y][t] + (i==direction?0:1);
			if (dist[nx][ny][nt] > dd) {
				dist[nx][ny][nt] = dd;
				que.push(node(nx, ny, nt));
			}
		}
		{
			int nt = (t+1)%6;
			if (dist[x][y][nt] > dist[x][y][t]+1) {
				dist[x][y][nt] = dist[x][y][t]+1;
				que.push(node(x, y, nt));
			}
		}
	}

	int ans = INF;
	rep(i, 6)
		ans = min(ans, dist[gx][gy][i]);
	return ans==INF?-1:ans;
}

int main(void)
{
	cin >> sx >> sy >> gx >> gy;
	cin >> n;
	memset(brd, 0, sizeof(brd));
	rep(i, n) {
		int x, y;
		cin >> x >> y;
		x += OFFSET;
		y += OFFSET;
		brd[x][y] = 1;
	}
	cin >> lx >> ly;

	sx += OFFSET;
	sy += OFFSET;
	gx += OFFSET;
	gy += OFFSET;
	cout << dijkstra() << endl;

	return 0;
}