#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i,x) for(int i=0;i<x;i++)
#define repn(i,x) for(int i=1;i<=x;i++)
#define SORT(x) sort(x.begin(),x.end())
#define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
int sx,sy,gx,gy;
int k;
bool bad[205][205];
int n,m;
int dp[205][205][6];
int dx[7]={0,1,1,0,-1,-1,0};
int dy[2][7]={{1,0,-1,-1,-1,0,0},{1,1,0,-1,0,1,0}};
int main(){
	cin>>sx>>sy>>gx>>gy;
	cin>>k;
	rep(i,k){
		int x,y; cin>>x>>y;
		bad[100+x][100+y] = 1;
	}
	cin>>n>>m;
	rep(i,n+105) rep(j,m+105) rep(b,6) dp[i][j][b] = INF;
	dp[100+sx][100+sy][0] = 0;
	priority_queue<P2,vector<P2>,greater<P2> >que;
	que.push(mp(mp(0,100+sx),mp(100+sy,0)));
	while(!que.empty()){
		P2 p = que.top(); que.pop();
		if(dp[p.fi.sc][p.sc.fi][p.sc.sc] != p.fi.fi) continue;
		int cd = (p.fi.sc-100) * (p.sc.fi-100) * p.sc.sc;
		cd = abs(cd);
		cd = (cd%6+6)%6;
		int f = p.fi.sc % 2;
		rep(k,7){
			int nx = p.fi.sc+dx[k];
			int ny = p.sc.fi+dy[f][k];
			int nz = (p.sc.sc+1)%6;
			if(abs(nx-100) <= n && abs(ny-100) <= m && dp[nx][ny][nz] > p.fi.fi+(k!=cd) && !bad[nx][ny]){
				dp[nx][ny][nz] = p.fi.fi+(k!=cd);
				que.push(mp( mp(dp[nx][ny][nz],nx),mp(ny,nz) ));
			}
		}
	}
	int ans = INF;
	rep(k,6) ans = min(ans,dp[gx+100][gy+100][k]);
	if(ans > 1e8) ans = -1;
	cout<<ans<<endl;
}
