#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3 + 3;
int fa[maxn];
int n;
int k[maxn], c[maxn];
int cnt = 0;
struct node {
  int x, y;
} cor[maxn];
struct edge {
  int fro, to;
  long long dis;
} G[maxn * maxn / 2];
inline void ini() {
  for (int i = 1; i < maxn; ++i) fa[i] = i;
}
int findx(int x) { return x == fa[x] ? x : findx(fa[x]); }
bool cmp(edge a, edge b) { return a.dis < b.dis; }
int anst[maxn], cntt;
node ansl[maxn];
int cntl;
inline long long abss(long long x) { return x > 0 ? x : -x; }
int main() {
  ini();
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d%d", &cor[i].x, &cor[i].y);
  for (int i = 1; i <= n; ++i) scanf("%d", &c[i]);
  for (int i = 1; i <= n; ++i) scanf("%d", &k[i]);
  for (int i = 1; i <= n; ++i) G[++cnt] = {0, i, c[i]};
  for (int i = 1; i <= n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      G[++cnt] = {i, j,
                  1ll * (k[i] + k[j]) *
                      (abss(cor[i].x - cor[j].x) + abss(cor[i].y - cor[j].y))};
    }
  }
  sort(G + 1, G + 1 + cnt, cmp);
  long long ans = 0;
  int have = 0;
  for (int i = 1; i <= cnt; ++i) {
    if (have == n) break;
    int x = G[i].fro, y = G[i].to, dt = G[i].dis;
    int fx = findx(x), fy = findx(y);
    if (fx != fy) {
      if (x == 0 || y == 0) {
        if (x == 0) anst[++cntt] = y;
        if (y == 0) anst[++cntt] = x;
      } else {
        ansl[++cntl] = {x, y};
      }
      ans += dt;
      fa[fy] = fx;
      ++have;
    }
  }
  printf("%I64d\n", ans);
  printf("%d\n", cntt);
  for (int i = 1; i <= cntt; ++i) printf("%d ", anst[i]);
  if (cntt) puts("");
  printf("%d\n", cntl);
  for (int i = 1; i <= cntl; ++i) printf("%d %d\n", ansl[i].x, ansl[i].y);
}
