#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int n;
int x[N], y[N];
int c[N];
int k[N];
int par[N], sz[N];
vector<pair<long long int, pair<int, int> > > edges;
vector<int> pow_stn;
vector<pair<int, int> > conn;
void init() {
  for (int i = 0; i <= n; i++) {
    par[i] = i;
    sz[i] = 1;
  }
}
int find(int x) { return (par[x] == x ? x : find(par[x])); }
void merge(int x, int y) {
  int x1 = find(x);
  int y1 = find(y);
  if (x1 == y1) {
    return;
  }
  if (sz[x1] > sz[y1]) {
    swap(x1, y1);
  }
  par[x1] = y1;
  sz[y1] += sz[x1];
}
int dst(int xi, int yi, int xj, int yj) { return abs(xi - xj) + abs(yi - yj); }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &x[i], &y[i]);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &c[i]);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &k[i]);
  }
  init();
  for (int i = 1; i <= n; i++) {
    edges.push_back({c[i], {0, i}});
  }
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      edges.push_back(
          {dst(x[i], y[i], x[j], y[j]) * 1LL * (k[i] + k[j]), {i, j}});
    }
  }
  sort(edges.begin(), edges.end());
  long long int ans = 0;
  for (auto it : edges) {
    int u = it.second.first;
    int v = it.second.second;
    long long int w = it.first;
    if (find(u) != find(v)) {
      merge(u, v);
      ans += w;
      if (u == 0) {
        pow_stn.push_back(v);
      } else {
        conn.push_back({u, v});
      }
    }
  }
  printf("%lld\n", ans);
  printf("%d\n", (int)pow_stn.size());
  for (auto it : pow_stn) {
    printf("%d ", it);
  }
  printf("\n");
  printf("%d\n", (int)conn.size());
  for (auto it : conn) {
    printf("%d %d\n", it.first, it.second);
  }
  return 0;
}
