#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2010;
const int MAXM = 4100000;
int F[MAXN];
struct node {
  long long x, y, c;
} a[MAXN];
struct Edge {
  long long u, v, w;
} edge[MAXM];
int tol;
vector<long long> vec1;
vector<pair<long long, long long> > vec2;
void addedge(long long u, long long v, long long w) {
  edge[tol].u = u;
  edge[tol].v = v;
  edge[tol++].w = w;
}
bool cmp(Edge a, Edge b) { return a.w < b.w; }
long long Find(long long x) {
  if (F[x] == -1)
    return x;
  else
    return F[x] = Find(F[x]);
}
long long Kruskal(int n) {
  memset(F, -1, sizeof(F));
  sort(edge, edge + tol, cmp);
  long long cnt = 0;
  long long ans = 0;
  for (int i = 0; i < tol; i++) {
    long long u = edge[i].u;
    long long v = edge[i].v;
    long long w = edge[i].w;
    long long t1 = Find(u);
    long long t2 = Find(v);
    if (t1 != t2) {
      if (u == 0)
        vec1.push_back(v);
      else if (v == 0)
        vec1.push_back(u);
      else
        vec2.push_back(make_pair(u, v));
      ans += w;
      F[t1] = t2;
      cnt++;
    }
    if (cnt == n) break;
  }
  if (cnt < n)
    return -1;
  else
    return ans;
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i].x >> a[i].y;
  for (int i = 1; i <= n; i++) {
    long long c;
    cin >> c;
    addedge(0, i, c);
    addedge(i, 0, c);
  }
  for (int i = 1; i <= n; i++) cin >> a[i].c;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (j == i) continue;
      long long ww =
          (a[i].c + a[j].c) * (abs(a[i].x - a[j].x) + abs(a[i].y - a[j].y));
      addedge(i, j, ww);
    }
  }
  long long ans = Kruskal(n);
  cout << ans << endl;
  cout << vec1.size() << endl;
  for (int i = 0; i < vec1.size(); i++) {
    if (i != 0) cout << " ";
    cout << vec1[i];
  }
  cout << endl;
  cout << vec2.size() << endl;
  for (int i = 0; i < vec2.size(); i++) {
    cout << vec2[i].first << " " << vec2[i].second << endl;
  }
}
