#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 2005;
int n, x[N], y[N], c[N], k[N];
int p[N];
int f(int u) { return u == p[u] ? u : p[u] = f(p[u]); }
int main() {
  iota(p, p + N, 0);
  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);
  vector<tuple<ll, int, int>> edges;
  for (int i = 1; i <= n; i++) {
    edges.emplace_back(c[i], 0, i);
  }
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      int dist = abs(x[i] - x[j]) + abs(y[i] - y[j]);
      edges.emplace_back(1LL * dist * (k[i] + k[j]), i, j);
    }
  }
  sort(edges.begin(), edges.end());
  ll cost = 0;
  vector<int> stations;
  vector<pair<int, int>> connections;
  for (auto e : edges) {
    ll d;
    int u, v;
    tie(d, u, v) = e;
    if (f(u) == f(v)) continue;
    cost += d;
    if (u == 0)
      stations.push_back(v);
    else
      connections.emplace_back(u, v);
    p[f(v)] = f(u);
  }
  printf("%lld\n", cost);
  printf("%d\n", (int)stations.size());
  for (int s : stations) printf("%d ", s);
  printf("\n");
  printf("%d\n", (int)connections.size());
  for (auto con : connections) {
    int u, v;
    tie(u, v) = con;
    printf("%d %d\n", u, v);
  }
}
