#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pt = complex<double>;
vector<ll> unions;
vector<pair<ll, ll>> mi;
void init(ll n) {
  unions.assign(n, -1);
  mi.assign(n, {-1, -1});
}
ll findSet(ll n) {
  if (unions[n] < 0) return n;
  return unions[n] = findSet(unions[n]);
}
void linkSets(ll a, ll b) {
  mi[a] = mi[b] = min(mi[a], mi[b]);
  if (unions[a] > unions[b])
    unions[a] = b;
  else if (unions[b] > unions[a])
    unions[b] = a;
  else {
    unions[a] = b;
    unions[b]--;
  }
}
void unionSets(ll a, ll b) {
  if (findSet(a) != findSet(b)) linkSets(findSet(a), findSet(b));
}
struct edge {
  ll a, b, w;
  bool operator<(const edge& o) const { return w < o.w; }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  ll n;
  cin >> n;
  vector<pair<ll, ll>> pos(n);
  for (ll i = 0; i < n; i++) {
    ll x, y;
    cin >> x >> y;
    pos[i] = {x, y};
  }
  init(n);
  for (ll i = 0; i < n; i++) {
    ll x;
    cin >> x;
    mi[i] = {x, i};
  }
  vector<ll> k(n);
  for (ll i = 0; i < n; i++) {
    cin >> k[i];
  }
  vector<edge> edges;
  for (ll i = 0; i < n; i++) {
    for (ll j = 0; j < i; j++) {
      edges.push_back({i, j,
                       (k[i] + k[j]) * (abs(pos[i].first - pos[j].first) +
                                        abs(pos[i].second - pos[j].second))});
    }
  }
  sort(begin(edges), end(edges));
  ll res = 0;
  vector<pair<ll, ll>> resa;
  vector<edge> resb;
  for (auto e : edges) {
    if (findSet(e.a) != findSet(e.b) &&
        e.w < max(mi[findSet(e.a)].first, mi[findSet(e.b)].first)) {
      unionSets(e.a, e.b);
      resb.push_back(e);
      res += e.w;
    }
  }
  for (ll i = 0; i < n; i++) {
    if (findSet(i) == i) {
      res += mi[i].first;
      resa.push_back(mi[i]);
    }
  }
  cout << res << endl;
  cout << (int)(resa).size() << endl;
  for (auto e : resa) {
    cout << e.second + 1 << " ";
  }
  cout << endl;
  cout << (int)(resb).size() << endl;
  for (auto e : resb) {
    cout << e.a + 1 << " " << e.b + 1 << endl;
  }
}
