#include<bits/stdc++.h>
using namespace std;
#define INF 1e9

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

vector<int> dijk(int s, int v, vector<vector<pair<int, int> > > adjlist){
    
    priority_queue <pair<int, int> > wait;
    vector<int> result(v, INF);

    //スタート地点を追加
    result[s] = 0;
    wait.push(make_pair(0, s));

    //ダイクストラ本体
    while(!wait.empty()){    //waitが空になるまで

        int nowpoint = wait.top().second;
        int nowcost = -wait.top().first;
        wait.pop();

        if(result[nowpoint] < nowcost) continue;


        //今いる頂点と隣接しているすべての頂点をなめる
        for(int i = 0; i < adjlist[nowpoint].size(); i++){

            int nextpoint = adjlist[nowpoint][i].second;
            int nextcost = nowcost + adjlist[nowpoint][i].first;
            //現時点より安く到達できそうであれば、結果を更新して優先度付きキューに格納
            if(result[nextpoint] > nextcost){
                result[nextpoint] = nextcost;
                wait.push(make_pair(-nextcost, nextpoint));
            }
        }
    }
    
    return result;         //結果列を返す
}


int main(){

    int sx, sy, gx, gy; cin >> sx >> sy >> gx >> gy;
    int n; cin >> n;
    vector<vector<bool> > g(202, vector<bool> (202, true));
    for(int i = 0; i < n; i++){
        int x, y; cin >> x >> y;
        g[x + 100][y + 100] = false;
    }

    int lx, ly; cin >> lx >> ly;
    
    int map[202][202][6];
    int node = 0;
    for(int x = -lx; x <= lx; x++){
        for(int y = -ly; y <= ly; y++){
            for(int t = 0; t < 6; t++){
                map[x + 100][y + 100][t] = node;
                //cout << x << " " << 
                node++;
            }
        }
    }

    vector<vector<pair<int, int> > > adjlist(node);      //first := コスト　second := 行先

    for(int x = -lx; x <= lx; x++){
        for(int y = -ly; y <= ly; y++){
            for(int t = 0; t < 6; t++){
                
                //cout << x << " " << y << " " << t << endl;

                int nownode = map[x + 100][y + 100][t];
                int nextnode = map[x + 100][y + 100][(t + 1) % 6];
                //cout << "ok" << endl;
                //その場にとどまる
                adjlist[nownode].push_back({1, nextnode});

                int dir = abs((x * y * t) % 6);

                //6方向探索
                for(int h = 0; h < 6; h++){
                    int ny;
                    int nx = x + dx[h];
                    if(x % 2 == 0){
                        ny = y + edy[h];
                    }else{
                        ny = y + ody[h];
                    }

                    //lx, lyを超えたらだめ
                    if(nx < -lx || lx < nx || ny < -ly || ly < ny) continue;

                    //家具があったらだめ
                    if(g[nx + 100][ny + 100] == false) continue;

                    nextnode = map[nx + 100][ny + 100][(t + 1) % 6];
                    
                    //指示通りかどうか
                    if(h == dir) adjlist[nownode].push_back({0, nextnode});
                    else adjlist[nownode].push_back({1, nextnode});
                }
            }
        }
    }

    int s = map[sx + 100][sy + 100][0];
    vector<int> result(node);
    result = dijk(s, node, adjlist);

    int ans = INF;
    for(int i = 0; i < 6; i++){
        int gg = map[gx + 100][gy + 100][i];
        ans = min(ans, result[gg]);
    }

    if(ans != INF) cout << ans << endl;
    else cout << -1 << endl;
    return 0;
}


Measured memory_bytes: 50984