#include <bits/stdc++.h>
using namespace std;
vector<int> parent;
vector<int> V;
int find_set(int v) {
  if (v == parent[v])
    return v;
  else {
    parent[v] = find_set(parent[v]);
    return parent[v];
  }
}
void union_sets(int u, int v) {
  u = find_set(u);
  v = find_set(v);
  if (u != v) parent[min(v, u)] = max(v, u);
  V[u] |= V[v];
  V[v] |= V[u];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> X(n), Y(n);
  for (int i = 0; i < n; i++) {
    cin >> X[i] >> Y[i];
    parent.push_back(i);
    V.push_back(false);
  }
  vector<long long> C(n), K(n);
  for (long long &c : C) cin >> c;
  for (long long &k : K) cin >> k;
  set<pair<long long, pair<long long, long long> > > S;
  for (int i = 0; i < n; i++) {
    S.insert({C[i], {i, -1}});
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      S.insert({(abs(X[i] - X[j]) + abs(Y[i] - Y[j])) * (K[i] + K[j]), {i, j}});
    }
  }
  long long ans = 0;
  vector<int> ansC;
  vector<pair<long long, long long> > ansE;
  for (auto [cost, P] : S) {
    auto [i, j] = P;
    if (j == -1) {
      int p = find_set(i);
      if (V[p]) continue;
      V[p] = true;
      ansC.push_back(i);
      ans += cost;
    } else {
      int u = find_set(i);
      int v = find_set(j);
      if (u == v) continue;
      if (V[u] && V[v]) continue;
      ansE.emplace_back(i, j);
      union_sets(i, j);
      ans += cost;
    }
  }
  cout << ans << "\n";
  cout << ansC.size() << "\n";
  for (int c : ansC) cout << c + 1 << " ";
  cout << "\n";
  cout << ansE.size() << "\n";
  for (auto [a, b] : ansE) cout << a + 1 << " " << b + 1 << "\n";
}
