#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000010;
long long n;
long long tot;
long long ans;
long long c[maxn];
long long k[maxn];
vector<long long> ans_city;
vector<pair<long long, long long>> ans_pair;
struct City {
  long long x, y;
} city[2020];
struct Edge {
  long long u, v, w;
  bool operator<(const Edge &rhs) const { return w < rhs.w; }
} edge[4 * maxn];
long long fa[maxn];
long long Find(long long x) {
  if (x == fa[x]) return x;
  return fa[x] = Find(fa[x]);
}
bool Union(long long x, long long y) {
  long long xx = Find(x), yy = Find(y);
  if (xx == yy) return false;
  fa[xx] = yy;
  return true;
}
void kruskal() {
  sort(edge + 1, edge + 1 + tot);
  long long cont = 0;
  for (int i = 1; i <= tot && cont < n; i++) {
    long long u = edge[i].u, v = edge[i].v, w = edge[i].w;
    if (Union(u, v)) {
      cont++;
      ans += w;
      if (u == 0)
        ans_city.push_back(v);
      else
        ans_pair.push_back(make_pair(u, v));
    }
  }
}
int main() {
  scanf("%lld", &n);
  for (int i = 0; i <= n; i++) fa[i] = i;
  for (int i = 1; i <= n; i++) scanf("%lld %lld", &city[i].x, &city[i].y);
  for (int i = 1; i <= n; i++) scanf("%lld", &c[i]);
  for (int i = 1; i <= n; i++) scanf("%lld", &k[i]);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j < i; j++) {
      edge[++tot].u = i;
      edge[tot].v = j;
      edge[tot].w = (abs(city[i].x - city[j].x) + abs(city[i].y - city[j].y)) *
                    (k[i] + k[j]);
    }
  }
  for (int i = 1; i <= n; i++) {
    edge[++tot].u = 0;
    edge[tot].v = i;
    edge[tot].w = c[i];
  }
  kruskal();
  printf("%lld\n", ans);
  printf("%d\n", ans_city.size());
  for (int i = 0; i < ans_city.size(); i++) printf("%lld ", ans_city[i]);
  printf("\n");
  printf("%d\n", ans_pair.size());
  for (int i = 0; i < ans_pair.size(); i++)
    printf("%lld %lld\n", ans_pair[i].first, ans_pair[i].second);
  printf("\n");
  return 0;
}
