#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
class union_find {
 private:
  vector<int> par;
  vector<int> ran;
  vector<long long int> size;

 public:
  union_find(int n);
  int find(int x);
  void unite(int x, int y);
  bool same(int x, int y);
  long long int show_size(int x);
};
union_find::union_find(int n) {
  par.resize(n);
  ran.resize(n);
  size.resize(n);
  for (int i = 0; i < (n); ++i) par[i] = i;
  for (int i = 0; i < (n); ++i) ran[i] = 0;
  for (int i = 0; i < (n); ++i) size[i] = 1;
};
int union_find::find(int x) {
  if (par[x] == x)
    return x;
  else
    return par[x] = find(par[x]);
};
void union_find::unite(int x, int y) {
  x = find(x);
  y = find(y);
  if (x == y) return;
  long long int t = show_size(x) + show_size(y);
  size[x] = size[y] = t;
  if (ran[x] < ran[y]) {
    par[x] = y;
  } else {
    par[y] = x;
    if (ran[x] == ran[y]) ran[x]++;
  }
};
long long int union_find::show_size(int x) {
  if (par[x] == x) return size[x];
  return show_size(par[x] = find(par[x]));
}
bool union_find::same(int x, int y) { return (find(x) == find(y)); };
class Edge {
 public:
  long long int source, target, cost;
  Edge(long long int source = 0, long long int target = 0,
       long long int cost = 0)
      : source(source), target(target), cost(cost) {}
  bool operator<(const Edge& e) const { return cost < e.cost; }
};
vector<int> lis;
vector<pair<int, int> > pai;
long long int kruskal(long long int N, vector<Edge>& edges) {
  long long int totalCost = 0;
  sort(edges.begin(), edges.end());
  union_find uni(N);
  long long int source, target;
  for (long long int i = 0; i < edges.size(); i++) {
    Edge e = edges[i];
    if (!uni.same(e.source, e.target)) {
      totalCost += e.cost;
      uni.unite(e.source, e.target);
      if (e.source == N - 1)
        lis.push_back(e.target + 1);
      else
        pai.emplace_back(e.source + 1, e.target + 1);
    }
  }
  return totalCost;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<Edge> es;
  vector<long long int> x(n), y(n), c(n), k(n);
  for (int i = 0; i < (n); ++i) cin >> x[i] >> y[i];
  for (int i = 0; i < (n); ++i) {
    cin >> c[i];
    es.push_back(Edge(n, i, c[i]));
  }
  for (int i = 0; i < (n); ++i) cin >> k[i];
  for (int i = 0; i < (n); ++i)
    for (int j = 0; j < (i); ++j) {
      long long int dist = llabs(x[i] - x[j]) + llabs(y[i] - y[j]);
      long long int cost = (k[i] + k[j]) * dist;
      es.push_back(Edge(i, j, cost));
    }
  cout << kruskal(n + 1, es) << endl;
  cout << lis.size() << endl;
  for (auto x : lis) cout << x << " ";
  cout << endl << pai.size() << endl;
  for (auto p : pai) cout << p.first << " " << p.second << endl;
  return 0;
}
