#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;

#define lengthof(array) (sizeof(array) / sizeof(*array))
#define dump(a) (cerr << (#a) << " = " << (a) << endl)
#define FOR(it,c) for(__typeof((c).begin())it=(c).begin(); it!=(c).end();++it)
#define RFOR(it,c) for(__typeof((c).rbegin())it=(c).rbegin(); it!=(c).rend();++it)

template<class T> inline void chmax(T& a, const T& b) { if(b > a) a = b; }
template<class T> inline void chmin(T& a, const T& b) { if(b < a) a = b; }

template<typename T, typename U> ostream& operator<<(ostream& os, const pair<T, U>& p) {
	os << '(' << p.first << ", " << p.second << ')';
	return os;
}

template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) {
	copy(v.begin(), v.end(), ostream_iterator<T>(os, " "));
	return os;
}

const int MAX = 210;
const int HALF = MAX / 2;
const int WALL = -1;

int num = 0;
int field[MAX][MAX];
int label[MAX][MAX];
const int dx[6] = {0, 1, 1, 0, -1, -1};
const int dy[2][6] = {{1, 1, 0, -1, 0, 1}, {1, 0, -1, -1, -1, 0}};

struct edge {
	int to, cost;
	edge(int t, int c):to(t), cost(c){}
};
typedef pair<int, int> P;

vector<vector<edge> > es;

int dijkstra(int s, int t) {
	priority_queue<P, vector<P>, greater<P> > que;
	vector<int> dist(es.size(), INT_MAX);
	que.push(P(0, s));
	dist[s] = 0;

	while(!que.empty()) {
		P p = que.top();
		que.pop();
		int v = p.second;
		if(dist[v] < p.first)
			continue;

		if(v % num == t)
			return p.first;

		for(int i = 0; i < es[v].size(); ++i) {
			edge& e = es[v][i];
			if(dist[e.to] > dist[v] + e.cost) {
				dist[e.to] = dist[v] + e.cost;
				que.push(P(dist[e.to], e.to));
			}
		}
	}

	return -1;
}

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

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

	for(int i = 0; i < n; ++i) {
		int x, y;
		cin >> x >> y;
		field[y + HALF][x + HALF] = WALL;		
	}

	int lx, ly;
	cin >> lx >> ly;

	for(int i = 0; i < MAX; ++i) {
		field[i][lx + HALF + 1] = WALL;
		field[i][-lx + HALF - 1] = WALL;
		field[ly + HALF + 1][i] = WALL;
		field[-ly + HALF - 1][i] = WALL;
	}

	for(int i = -ly + HALF; i <= ly + HALF; ++i) {
		for(int j = -lx + HALF; j <= lx + HALF; ++j) {
			if(field[i][j] == WALL)
				continue;

			label[i][j] = num++;
		}
	}

	es.resize(num * 6);
	for(int i = -ly + HALF; i <= ly + HALF; ++i) {
		for(int j = -lx + HALF; j <= lx + HALF; ++j) {
			if(field[i][j] == WALL)
				continue;

			for(int t = 0; t < 6; ++t) {
				const int from = label[i][j] + num * t;
				const int next_t = (t + 1) % 6;
				const int instruct = abs((i - HALF) * (j - HALF) * t) % 6;

				es[from].push_back(edge(label[i][j] + num * next_t, 1));
				for(int d = 0; d < 6; ++d) {
					const int nx = j + dx[d], ny = i + dy[j % 2][d];
					if(field[ny][nx] != WALL) {
						const int cost = (d == instruct ? 0 : 1);
						const edge e(label[ny][nx] + num * next_t, cost);
						es[from].push_back(e);
					}
				}
			}
		}
	}

	cout << dijkstra(label[sy + HALF][sx + HALF], label[gy + HALF][gx + HALF]) << endl;

	return EXIT_SUCCESS;
}

Measured memory_bytes: 26476