#include<bits/stdc++.h>
using namespace std;
struct edge{
  int to, cost;
};
typedef pair<int, int> pii;//cost, vertex
int dx[] = {0, 1, 1, 0, -1, -1};
int dy[2][6] = {{1, 0, -1, -1, -1, 0},
                {1, 1, 0, -1, 0, 1}};

int solve(vector<vector<edge> >& g, int s, int goal, int lx, int ly){
  int n = g.size();
  vector<int> dp(n, 1e9);
  dp[s] = 0;
  int res = -1;
  priority_queue<pii, vector<pii>, greater<pii> > que;
  que.push(pii(0, s));
  while(!que.empty()){
    int c = que.top().first;
    int v = que.top().second;
    que.pop();
    if(v%(lx*ly) == goal){
      res = dp[v];
      break; 
    }
    for (int i = 0; i < g[v].size(); i++) {
      edge e = g[v][i];
      if(dp[e.to] > c + e.cost){
        dp[e.to] = c + e.cost;
        que.push(pii(c + e.cost, e.to));
      }
    }
  }
  return res;
}

int main(int argc, char *argv[]){
  int sx, sy, gx, gy, n;
  cin >> sx >> sy >> gx >> gy >> n;
  int x[n], y[n], lx, ly;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  cin >> lx >> ly;
  sx += lx;
  sy += ly;
  gx += lx;
  gy += ly;
  ly *= 2;
  lx *= 2;
  ly++;lx++;
  int maxi = 6;
  vector<vector<int> > grid(ly, vector<int>(lx, 0));
  vector<vector<edge> >g(maxi*ly*lx, vector<edge>());
  for (int i = 0; i < n; i++) {
    grid[y[i] + ly/2][x[i] + lx/2] = 1;
  }
  for (int t = 0; t < maxi; t++) {
    for (int i = 0; i < ly; i++) {
      for (int j = 0; j < lx; j++) {
        if(grid[i][j] != 0)continue;
        for (int k = 0; k < 6; k++) {
          int nv = (t + 1)*ly*lx +
            (lx*(i + dy[abs(j - lx/2)%2][k]) + (j + dx[k]));
          nv %= maxi*ly*lx;
          if(!(0 <= i + dy[abs(j - lx/2)%2][k] &&
               i + dy[abs(j - lx/2)%2][k] < ly) ||
             !(0 <= j + dx[k] && j + dx[k] < lx))
            continue;

          if(abs(t*(i - ly/2)*(j - lx/2))%6 == k){
            g[t*ly*lx + (lx*i + j)].
              push_back((edge){nv, 0});
          }else{
            g[t*ly*lx + (lx*i + j)].
              push_back((edge){nv, 1});
          }
        }
        g[t*ly*lx + (lx*i + j)].
          push_back((edge){((t + 1)*ly*lx + (lx*i + j))%
                (maxi*ly*lx), 1});
      }
    }
  }
  // for (int t = 0; t < maxi; t++) {
  //   for (int i = 0; i < ly; i++) {
  //     for (int j = 0; j < lx; j++) {
  //       std::cout << t*ly*lx + (lx*i + j) << ":"  << std::endl;
  //       for (int k = 0; k < g[(t*ly*lx) + (lx*i + j)].size(); k++) {
  //         std::cout << g[(t*ly*lx) + (lx*i + j)][k].to << " ";
  //       }
  //       std::cout << std::endl;
  //       std::cout << std::endl;
  //     }
  //   }
  // }
  // std::cout << sy*lx + sx << std::endl;
  // std::cout << gy*lx + gx << std::endl;
  int ans = solve(g, sy*lx + sx, gy*lx + gx, lx, ly);
  if(ans == 1e9){
    std::cout << -1 << std::endl;
  }else{
    std::cout << ans << std::endl;
  }
  return 0;
}