#include <bits/stdc++.h>
using namespace std;
function<void(void)> ____ = []() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
};
const int MAXN = 2222;
int n;
struct STA {
  int_fast64_t x, y;
} sta[MAXN];
struct EDGE {
  int_fast64_t cst;
  int a, b;
  EDGE() {}
  EDGE(int_fast64_t cst, int a, int b) {
    this->cst = cst;
    this->a = a;
    this->b = b;
  }
};
int_fast64_t c[MAXN], k[MAXN], cost[MAXN][MAXN], cpos[MAXN];
vector<EDGE> edge;
int root[MAXN];
vector<pair<int, int> > connections;
int_fast64_t ans;
void input() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> sta[i].x >> sta[i].y;
    root[i] = i;
    cpos[i] = i;
  }
  for (int i = 1; i <= n; i++) cin >> c[i];
  for (int i = 1; i <= n; i++) cin >> k[i];
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      cost[i][j] =
          (abs(sta[i].x - sta[j].x) + abs(sta[i].y - sta[j].y)) * (k[i] + k[j]);
      edge.push_back(EDGE(cost[i][j], i, j));
    }
  sort(edge.begin(), edge.end(), [&](EDGE A, EDGE B) { return A.cst < B.cst; });
}
int findx(int x) {
  if (x != root[x]) root[x] = findx(root[x]);
  return root[x];
}
int main() {
  ____();
  input();
  for_each(edge.begin(), edge.end(), [&](EDGE &e) {
    if (findx(e.a) == findx(e.b)) return;
    if (max(c[findx(e.a)], c[findx(e.b)]) >= e.cst) {
      ans += e.cst;
      connections.push_back(make_pair(e.a, e.b));
      if (c[findx(e.a)] > c[findx(e.b)]) {
        c[findx(e.a)] = c[findx(e.b)];
        cpos[findx(e.a)] = cpos[findx(e.b)];
      }
      root[findx(e.b)] = findx(e.a);
    }
  });
  vector<int> rt;
  for (int i = 1; i <= n; i++)
    if (root[i] == i) {
      rt.push_back(cpos[i]);
      ans += c[i];
    }
  cout << ans << endl;
  cout << rt.size() << endl;
  for_each(rt.begin(), rt.end(), [&](int &x) { cout << x << ' '; });
  cout << endl << connections.size() << endl;
  for_each(connections.begin(), connections.end(), [&](pair<int, int> &x) {
    cout << x.first << ' ' << x.second << endl;
  });
  return 0;
}
