// Hexerpents of Hexwamp
#include <iostream>
#include <vector>
#include <set>
#include <queue>
#include <unordered_set>

namespace
{
    // a little helper that should IMHO be standardized
    template<typename T>
    std::size_t make_hash(const T& v)
    {
        return std::hash<T>()(v);
    }

    // adapted from boost::hash_combine
    void hash_combine(std::size_t& h, const std::size_t& v)
    {
        h ^= v + 0x9e3779b9 + (h << 6) + (h >> 2);
    }

    // hash any container
    template<typename T>
    struct hash_container
    {
        size_t operator()(const T& v) const
        {
            size_t h=0;
            for( const auto& e : v ) {
                hash_combine(h, make_hash(e));
            }
            return h;
        }
    };
}

namespace std
{
    // support for pair<T,U> if T and U can be hashed
    template<typename T, typename U>
    struct hash<pair<T, U>>
    {
        size_t operator()(const pair<T,U>& v) const
        {
            size_t h=make_hash(v.first);
            hash_combine(h, make_hash(v.second));
            return h;
        }
    };

    // support for vector<T> if T is hashable
    // (the T... is a required trick if the vector has a non-standard allocator)
    template<typename... T>
    struct hash<vector<T...>> : hash_container<vector<T...>> {};
}

using namespace std;

using P = pair<int, int>;

vector<P> dir{P(0, -1), P(0, 1), P(-1, 0), P(-1, 1), P(1, -1), P(1, 0)};

int is_valid_state(int state){
  while(state){
    if((state & 1) && (state & (1<<1))) return 0;
    state = state >> 1;
  }
  return 1;
}

int dist(P a, P b){
  return max(abs(a.first - b.first), max(abs(a.second - b.second), abs((a.second - b.second) + (a.first - b.first))));
}

int is_dead_serpent(vector<P>& serpent, unordered_set<P>& rock){
  for(int i=0;i<serpent.size();i++){
    for(int j=i+1;j<serpent.size();j++){
      P a = serpent[i];
      P b = serpent[j];
      int d = dist(a, b);
      if(d == 0) return 1;
      if(j - i != 1){
	if(d == 1) return 1;
      }else{
	if(d > 1) return 1;
      }
    }
  }

  for(int i=0;i<serpent.size();i++){
    if(rock.find(serpent[i]) != rock.end()) return 1;
  }    
  
  return 0;
}

int main(){
  int N;
  int K;
  int X, Y;
  while(cin >> N, N){
    vector<P>serpent(N);
    for(auto &s: serpent){
      cin >> s.first >> s.second;
    }

    cin >> K;
    unordered_set<P>rock;
    for(int i=0;i<K;i++){
      int x, y;
      cin >> x >> y;
      rock.insert(P(x, y));
    }
    cin >> X >> Y;
    P goal = P(X, Y);
    queue<pair<vector<P>, pair<int, int> >>que;
    unordered_set<vector<P> > visited;
    que.push(make_pair(serpent, make_pair(0, 0)));
    int maxcost = 0;
    while(!que.empty()){
      vector<P> ser = que.front().first;
      int cost = que.front().second.first;
      int last_state = que.front().second.second;
      que.pop();
      //if(maxcost < cost){
      //cout << cost << " " << que.size() << " " << visited.size() << endl;
      //	maxcost = cost;
      //}
      
      if(ser[0] == goal){
	cout << cost << endl;
	break;
      }
      if(visited.find(ser) != visited.end()) continue;
      visited.insert(ser);
      if(20 - cost < dist(ser[0], goal)) continue;

      for(int state = 1;state < (1<<N);state++){
	if(last_state & state & ((1<<(N-1)) - 2)) continue;
	//if(!((last_state&1) | (state&1))) continue;
	if(!is_valid_state(state)) continue;
	int num_move_section = __builtin_popcount(state);

	vector<int> next[4];
	int j = 0;
	int flag = 0;
	for(int i=0;i<num_move_section;i++){
	  while(!(state & (1<<j))) j++;
	  if(j == 0){
	    for(int k=0;k<6;k++){
	      if(dist(make_pair(ser[j].first + dir[k].first, ser[j].second + dir[k].second), ser[j+1]) == 1) next[i].push_back(k);
	    }
	  }else if(j == N-1){
	    for(int k=0;k<6;k++){
	      if(dist(make_pair(ser[j].first + dir[k].first, ser[j].second + dir[k].second), ser[j-1]) == 1) next[i].push_back(k);
	    }
	  }else{
	    for(int k=0;k<6;k++){
	      if(dist(make_pair(ser[j].first + dir[k].first, ser[j].second + dir[k].second), ser[j-1]) == 1 && dist(make_pair(ser[j].first + dir[k].first, ser[j].second + dir[k].second), ser[j+1]) == 1) next[i].push_back(k);
	    }
	    if(next[i].size() == 0) flag = 1;
	  }
	  j++;
	}
	if(flag) continue;
	
	vector<vector<int> >products(4, vector<int>(num_move_section, 0));
	if(next[0].size() == 2 && next[num_move_section-1].size() == 2){
	  products.resize(4);
	  products[1][0] = products[2][num_move_section-1] = products[3][0] = products[3][num_move_section-1] = 1;
	}else if(next[0].size() == 2){
	  products.resize(2);
	  products[1][0] = 1;	  
	}else if(next[num_move_section-1].size() == 2){
	  products.resize(2);
	  products[1][num_move_section-1] = 1;
	}else{
	  products.resize(1);
	}

	for(auto&& idxs: products){
	  vector<P> next_ser(ser);	  
	  int j = 0;
	  //cout << endl;
	  for(int i=0;i<num_move_section;i++){
	    while(!(state & (1<<j))) j++;

	    //for(auto &&x: ser){
	    //  cout << "(" << x.first << ", " << x.second << ") ";
	    //}cout << endl;

	    //cout << state << " " << j << " " << next_ser[j].first << " " << next_ser[j].second << " to ";
	    next_ser[j].first += dir[next[i][idxs[i]]].first;
	    next_ser[j].second += dir[next[i][idxs[i]]].second;
	    //cout << next_ser[j].first << " " << next_ser[j].second << endl;
	    j++;
	  }
	  if(is_dead_serpent(next_ser, rock)) continue;
	  if(visited.find(next_ser) != visited.end()) continue;
	  que.push(make_pair(next_ser, make_pair(cost + 1, state)));
	}
      }
    }
    //cout << que.size() << endl;
  }
  return 0;
}



Measured memory_bytes: 20776