#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  int64_t n;
  cin >> n;
  struct point {
    int64_t x, y;
  };
  vector<point> a(n + 1);
  for (int64_t i = 1; i < n + 1; i++) {
    cin >> a[i].x >> a[i].y;
  }
  vector<int64_t> c(n + 1), k(n + 1);
  for (int64_t i = 1; i < n + 1; i++) {
    cin >> c[i];
  }
  for (int64_t i = 1; i < n + 1; i++) {
    cin >> k[i];
  }
  vector<vector<int64_t>> d(n + 1, vector<int64_t>(n + 1, INT64_MAX));
  for (int64_t i = 1; i < n + 1; i++) {
    d[0][i] = c[i];
    d[i][0] = c[i];
  }
  for (int64_t i = 1; i < n + 1; i++) {
    for (int64_t j = 1; j < n + 1; j++) {
      d[i][j] = d[j][i] =
          (k[i] + k[j]) * (abs(a[i].x - a[j].x) + abs(a[i].y - a[j].y));
    }
  }
  int64_t ans = 0;
  vector<int64_t> used(n + 1, 0);
  vector<int64_t> min_c(n + 1, INT64_MAX), p(n + 1, -1);
  vector<pair<int64_t, int64_t>> mst;
  min_c[0] = 0;
  for (int64_t i = 0; i < n + 1; i++) {
    int64_t v = -1;
    for (int64_t j = 0; j < n + 1; j++) {
      if (!used[j] && (v == -1 || min_c[j] < min_c[v])) {
        v = j;
      }
    }
    used[v] = true;
    ans += min_c[v];
    mst.emplace_back(v, p[v]);
    for (int64_t j = 0; j < n + 1; j++) {
      if (d[v][j] < min_c[j]) {
        min_c[j] = d[v][j];
        p[j] = v;
      }
    }
  }
  cout << ans << "\n";
  vector<int64_t> ans1;
  vector<pair<int64_t, int64_t>> ans2;
  for (auto it : mst) {
    if (it.second == -1) {
      continue;
    }
    if (it.second == 0) {
      ans1.push_back(it.first);
    } else {
      ans2.emplace_back(it.first, it.second);
    }
  }
  cout << ans1.size() << "\n";
  for (auto it : ans1) {
    cout << it << " ";
  }
  cout << "\n";
  cout << ans2.size() << "\n";
  for (auto it : ans2) {
    cout << it.first << " " << it.second << "\n";
  }
}
