#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <climits>
#include <cstring>
#include <cassert>

#define rep(i, m, n) for(int i=int(m);i<int(n);i++)
#define all(c) begin(c),end(c)

template<typename T1, typename T2>
inline void chmin(T1 &a, T2 b) { if (a > b) a = b; }

template<typename T1, typename T2>
inline void chmax(T1 &a, T2 b) { if (a < b) a = b; }

typedef long long int ll;
using ll = long long int;
using ull = long long unsigned int;
using Int = long long int;
using uInt = long long unsigned int;
using Double = long double;
using namespace std;
#define INF (1 << 30) - 1
#define INFl (ll)5e15
#define DEBUG 0
#define dump(x)  cerr << #x << " = " << (x) << endl
#define MOD 1000000007


//edit
template<typename T = int,
        typename E = int,
        typename F = function<T(T, E)>,
        typename Compare = function<bool(T, T) >>
class Dijkstra {
public:
    Int N;
    T s_value;
    T init_value;
    F f;
    Compare cmp;

    vector<T> dist;
    vector<vector<pair<int, E>>>
            G; // first : index, second : E


    Dijkstra(Int N, T init_value = INF, T s_value = 0,
             F f = [](T l, E r) { return l + r; },
             Compare cmp = [](T l, T r) { return l > r; }
    ) : N(N), s_value(s_value), init_value(init_value), f(f), cmp(cmp) {
        dist.resize(N, init_value);
        G.resize(N);
    }

    void add_edge(int f, int t, E e) {
        G[f].push_back(make_pair(t, e));
    }

    void compute(int s) {
        using P = pair<T, int>;
        auto pq_cmp = [this](P l, P r) -> bool {
            return cmp(l.first, r.first);
        };
        priority_queue<P, vector<P>, decltype(pq_cmp)> que(pq_cmp);
        fill(dist.begin(), dist.end(), init_value);
        dist[s] = s_value;

        que.push(P(dist[s], s));

        while (!que.empty()) {
            P p = que.top();
            que.pop();
            int v = p.second;

//            if (!cmp(dist[v], p.first) && (dist[v] != p.first)) continue;
            if (cmp(p.first, dist[v])) continue;

            for (int i = 0; i < G[v].size(); i++) {
                int to_idx = G[v][i].first;
                E to_e = G[v][i].second;

                if (cmp(dist[to_idx], f(dist[v], to_e)) && !(dist[to_idx] == init_value && dist[v] == init_value)) {
                    dist[to_idx] = f(dist[v], to_e);
                    que.push(P(dist[to_idx], to_idx));
                }
            }
        }
    }

    T get_dist(int v) {
        return dist[v];
    }


};

class Solve {
public:
    void solve() {
        int sx, sy, gx, gy;
        int n;
        int lx, ly;
        vector<int> x, y;
        set<pair<int, int>> jam;

        cin >> sx >> sy >> gx >> gy;
        cin >> n;
        rep(i, 0, n) {
            int x_, y_;
            cin >> x_ >> y_;
            x.push_back(x_);
            y.push_back(y_);
            jam.insert(make_pair(x_, y_));
        }
        cin >> lx >> ly;

        int sz = (lx * 2 + 1) * (ly * 2 + 1) * 6;

        auto conv = [lx, ly](int x, int y, int t) -> int {
            return ((ly * 2 + 1) * (x + lx) + (y + ly)) * 6 + t;
        };

//        Dijkstra<> dij(sz);
        Dijkstra<pair<int, int>, pair<int, int>> dij(sz, make_pair(INF, -1), make_pair(0, -1),
                                                     [](pair<int, int> a, pair<int, int> b) -> pair<int, int> {
                                                         int fs = a.first + b.second;
                                                         int sc = b.first;
                                                         return make_pair(fs, sc);
                                                     },
                                                     [](pair<int, int> a, pair<int, int> b) {
                                                         return a.first > b.first;
                                                     }
        );


        for (int i = -lx; i <= lx; ++i) {
            for (int j = -ly; j <= ly; ++j) {
                vector<int> dx = {0, 1, 1, 0, -1, -1, 0};
                vector<int> dy = {1, 0, -1, -1, -1, 0, 0};
                if (i % 2) {
                    dx = {0, 1, 1, 0, -1, -1, 0};
                    dy = {1, 1, 0, -1, 0, 1, 0};
                }
                for (int k = 0; k <= 6; ++k) {
                    int nx = i + dx[k];
                    int ny = j + dy[k];
                    if (nx < -lx || nx > lx || ny < -ly || ny > ly) {
                        continue;
                    }
                    if (jam.count(make_pair(nx, ny))) {
                        continue;
                    }

                    for (int t = 0; t < 6; ++t) {
                        int from = conv(i, j, t);
                        int to = conv(nx, ny, (t + 1) % 6);
                        int cost = (k == abs(i * j * t) % 6) ? 0 : 1;
                        pair<int, int> edge(from, cost);
//                        dij.add_edge(from, to, cost);
                        dij.add_edge(from, to, edge);
                    }
                }
            }

        }

        int start_v = conv(sx, sy, 0);
        dij.compute(start_v);

        int ans = INF;
        for (int t = 0; t < 6; ++t) {
            int goal_t = conv(gx, gy, t);
            int tmp = dij.get_dist(goal_t).first;
            chmin(ans, tmp);
        }

        bool debug = true;
        debug = false;
        if (debug) {
            int p = conv(gx, gy, 1);
            while (p != -1) {
                cout << p << endl;
                p = dij.get_dist(p).second;
            }
        }


        if (ans == INF) {
            cout << -1 << endl;
        } else {
            cout << ans << endl;
        }


    }
};


int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);
//    std::ifstream in("input.txt");
//    std::cin.rdbuf(in.rdbuf());

    Solve().solve();


    return 0;
}



Measured memory_bytes: 36728