#include <bits/stdc++.h>
using namespace std;
vector<long long> dsu;
long long par(long long x) {
  while (dsu[x] != x) {
    dsu[x] = dsu[dsu[x]];
    x = dsu[x];
  }
  return x;
}
void un(long long x, long long y) {
  long long px = par(x);
  long long py = par(y);
  if (px != py) {
    dsu[py] = px;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  priority_queue<pair<long long, pair<long long, long long>>,
                 vector<pair<long long, pair<long long, long long>>>,
                 greater<pair<long long, pair<long long, long long>>>>
      pque;
  vector<long long> x(n);
  vector<long long> y(n);
  for (long long i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  vector<long long> k(n);
  vector<long long> c(n);
  for (long long i = 0; i < n; i++) {
    cin >> c[i];
  }
  for (long long i = 0; i < n; i++) {
    cin >> k[i];
  }
  long long ans = 0;
  dsu = vector<long long>(n + 1);
  dsu[n] = n;
  for (long long i = 0; i < n; i++) {
    dsu[i] = i;
    pque.push({c[i], {0, i + 1}});
    for (long long j = i + 1; j < n; j++) {
      pque.push({(k[i] + k[j]) * (abs(x[i] - x[j]) + abs(y[i] - y[j])),
                 {i + 1, j + 1}});
    }
  }
  vector<long long> p;
  vector<pair<long long, long long>> edges;
  while (!pque.empty()) {
    auto it = pque.top();
    pque.pop();
    long long x1 = it.second.first;
    long long x2 = it.second.second;
    if (par(x1) != par(x2)) {
      un(x1, x2);
      ans += it.first;
      if (x1 == 0) {
        p.push_back(x2);
      } else {
        edges.push_back({x1, x2});
      }
    }
  }
  cout << ans << endl;
  cout << p.size() << endl;
  for (auto it : p) {
    cout << it << " ";
  }
  cout << endl;
  cout << edges.size() << endl;
  for (auto it : edges) {
    cout << it.first << " " << it.second << endl;
  }
  return 0;
}
