#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18 + 5;
const int MOD = 1e9 + 7;
const double EPS = 1e-9;
template <class T = int>
inline T next() {
  T x;
  cin >> x;
  return x;
}
struct DSU {
  vector<int> base, range;
  DSU(int n) {
    base = range = vector<int>(n, 1);
    for (int i = 0; i < n; i++) base[i] = i;
  }
  int get_id(int v) {
    if (base[v] != v) base[v] = get_id(base[v]);
    return base[v];
  }
  void merge(int x, int y) {
    x = get_id(x);
    y = get_id(y);
    if (range[x] < range[y]) swap(x, y);
    range[x] += range[y];
    base[y] = x;
  }
};
struct edge {
  int u, v;
  long long weight;
  edge(int _u, int _v, long long _weight) {
    u = _u;
    v = _v;
    weight = _weight;
  }
  bool operator<(const edge &other) const { return weight < other.weight; }
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n = next();
  int *x = new int[n], *y = new int[n];
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  int *k = new int[n];
  vector<edge> edges;
  for (int i = 0; i < n; i++) edges.push_back(edge(0, i + 1, next()));
  for (int i = 0; i < n; i++) cin >> k[i];
  for (int i = 0; i < n; i++) {
    for (int j = i; j < n; j++) {
      edge new_edge(
          i + 1, j + 1,
          (long long)(k[i] + k[j]) * (abs(x[i] - x[j]) + abs(y[i] - y[j])));
      edges.push_back(new_edge);
    }
  }
  delete k, x, y;
  sort(edges.begin(), edges.end());
  DSU dsu(n + 1);
  vector<int> stations;
  vector<pair<int, int> > final_edges;
  long long all_cost = 0;
  for (edge eg : edges) {
    if (dsu.get_id(eg.u) != dsu.get_id(eg.v)) {
      dsu.merge(eg.u, eg.v);
      all_cost += eg.weight;
      if (eg.u == 0)
        stations.push_back(eg.v);
      else
        final_edges.push_back({eg.u, eg.v});
    }
  }
  cout << all_cost << '\n';
  cout << stations.size() << '\n';
  for (int v : stations) cout << v << ' ';
  cout << '\n' << final_edges.size() << '\n';
  for (pair<int, int> v : final_edges)
    cout << v.first << ' ' << v.second << '\n';
  return 0;
}
