#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>

using namespace std;

#define FOR(i,k,n) for(int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cerr<<*i<<" "; cerr<<endl; }
inline bool valid(int x, int y, int W, int H){ return (x >= 0 && y >= 0 && x < W && y < H); }

typedef long long ll;
const int INF = 100000000;
const double EPS = 1e-8;
const int MOD = 1000000007;
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}};
struct S{
  int x, y, s, t;
  S(int x, int y, int s, int t) : 
    x(x), y(y), s(s), t(t) {}
  bool operator < (const S& st) const {
    return s > st.s;
    if(t != st.t) return t > st.t;
    if(x != st.x) return x > st.x;
    return y > st.y;
  }
};

int main(){
  int sx, sy, gx, gy;
  while(cin>>sx>>sy>>gx>>gy){
    int n;
    bool furnit[201][201] = {};
    int fx[1000], fy[1000];
    cin>>n;
    REP(i, n){
      cin>>fx[i]>>fy[i];
    }
    int W, H;
    cin>>W>>H;
    REP(i, n){
      furnit[fy[i] + H][fx[i] + W] = true;
    }
    sx += W; sy += H; gx += W; gy += H;
    priority_queue<S> que;
    que.push(S(sx, sy, 0, 0));
    int ans = -1;
    bool used[201][201][6] = {};
    while(!que.empty()){
      S s = que.top(); que.pop();
      if(s.x == gx && s.y == gy) {
        ans = s.s;
        break;
      }
      if(used[s.y][s.x][s.t]) continue;
      used[s.y][s.x][s.t] = true;
      int dir = abs((s.x - W) * (s.y - H) * s.t) % 6;
      //printf("x = %d y = %d s = %d t = %d dir = %d\n", s.x - W, s.y - H, s.s, s.t, dir);
      for(int r = 0; r < 7; r++){
        S next(s.x + dx[r], s.y + dy[abs(s.x - W) % 2][r], (dir == r) ? s.s : (s.s + 1), (s.t + 1) % 6);
        //printf("next[%d]: x = %d y = %d s = %d t = %d ", r, next.x - W, next.y - H, next.s, next.t);
        if(valid(next.x, next.y, 2 * W + 1, 2 * H + 1) && !furnit[next.y][next.x] && !used[next.y][next.x][next.t]){
          //printf("OK");
          que.push(next);
        }
        //printf("\n");
      }
    }
    cout<<ans<<endl;
  }
  return 0;
}