#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 2005;
long long par[MAXN], x[MAXN], y[MAXN], c[MAXN], k[MAXN];
vector<long long> path[MAXN];
long long Find(long long u) {
  return par[u] = (par[u] == u ? u : Find(par[u]));
}
void Union(long long u, long long v) { par[Find(u)] = Find(v); }
long long dist(long long x1, long long y1, long long x2, long long y2) {
  return abs(x1 - x2) + abs(y1 - y2);
}
signed main() {
  cin.tie(0)->sync_with_stdio(0), cout.tie(0)->sync_with_stdio(0);
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (long long i = 1; i <= n; i++) cin >> c[i];
  for (long long i = 1; i <= n; i++) cin >> k[i];
  vector<pair<long long, pair<long long, long long> > > edges;
  for (long long i = 1; i <= n; i++)
    for (long long j = i + 1; j <= n; j++)
      edges.push_back({(k[i] + k[j]) * dist(x[i], y[i], x[j], y[j]), {i, j}});
  for (long long i = 1; i <= n; i++) edges.push_back({c[i], {i, 0}});
  for (long long i = 0; i <= n; i++) par[i] = i;
  long long ans = 0;
  vector<pair<long long, long long> > res;
  sort(edges.begin(), edges.end());
  for (auto i : edges) {
    auto [u, v] = i.second;
    long long val = i.first;
    if (u > v) swap(u, v);
    if (Find(u) != Find(v)) {
      ans += val;
      if (u > v) swap(u, v);
      res.push_back({u, v});
      Union(u, v);
    }
  }
  cout << ans << '\n';
  vector<long long> build;
  vector<pair<long long, long long> > e;
  for (auto [u, v] : res) {
    if (!u)
      build.push_back(v);
    else
      e.push_back({u, v});
  }
  cout << build.size() << '\n';
  for (auto i : build) cout << i << ' ';
  cout << '\n';
  cout << e.size() << '\n';
  for (auto [u, v] : e) cout << u << ' ' << v << '\n';
}
