#include <bits/stdc++.h>
using namespace std;
long long int cost = 0;
long long int dsu[3000];
long long int size[3000];
long long int val[3000];
long long int _x[3000];
long long int _y[3000];
long long int _c[3000];
long long int _k[3000];
struct edge {
  long long int a;
  long long int b;
  long long int w;
  edge() : a(0), b(0), w(0){};
  edge(long long int a, long long int b, long long int c) {
    this->a = a;
    this->b = b;
    this->w = c;
  }
};
bool comp(edge i1, edge i2) { return (i1.w < i2.w); }
edge e[3000 * 3000];
void initialize() {
  for (long long int i = 0; i < 3000; i++) {
    size[i] = 1;
    dsu[i] = i;
    val[i] = 0;
  }
}
long long int root(long long int i) {
  while (dsu[i] != i) {
    dsu[i] = dsu[dsu[i]];
    i = dsu[i];
  }
  return i;
}
vector<long long int> _ans;
vector<pair<long long int, long long int>> __ans;
void uni(long long int A, long long int B, long long int W) {
  long long int root_A = root(A);
  long long int root_B = root(B);
  if (root_A == root_B) return;
  cost += W;
  if (A == 0) {
    _ans.push_back(B);
  } else {
    __ans.push_back(make_pair(A, B));
  }
  if (size[root_A] < size[root_B]) {
    dsu[root_A] = dsu[root_B];
    size[root_B] += size[root_A];
  } else {
    dsu[root_B] = dsu[root_A];
    size[root_A] += size[root_B];
  }
}
long long int n, m, x, y, z;
int main() {
  initialize();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  cin >> n;
  long long int cnt = 0;
  for (int i = 1; i <= n; i++) {
    cin >> x >> y;
    _x[i] = x;
    _y[i] = y;
  }
  for (int i = 1; i <= n; i++) {
    cin >> _c[i];
    e[cnt].a = 0;
    e[cnt].b = i;
    e[cnt].w = _c[i];
    cnt++;
  }
  for (int i = 1; i <= n; i++) {
    cin >> _k[i];
  }
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      e[cnt].a = i;
      e[cnt].b = j;
      e[cnt].w = (_k[i] + _k[j]) * (abs(_x[i] - _x[j]) + abs(_y[i] - _y[j]));
      cnt++;
    }
  }
  m = cnt;
  sort(e, e + m, comp);
  for (long long int i = 0; i < m; i++) {
    uni(e[i].a, e[i].b, e[i].w);
  }
  cout << cost << endl;
  cout << _ans.size() << endl;
  sort(__ans.begin(), __ans.end());
  sort(_ans.begin(), _ans.end());
  for (auto i : _ans) {
    cout << i << " ";
  }
  cout << endl;
  cout << __ans.size() << endl;
  for (auto i : __ans) {
    cout << i.first << " " << i.second << endl;
  }
  return 0;
}
