#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> v;
vector<int> c, k;
vector<pair<long long, int>> e[2123];
int X[2123];
vector<int> eb;
vector<pair<int, int>> cm;
int main() {
  int n, x, y;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> x >> y;
    v.push_back(make_pair(x, y));
  }
  for (int i = 0; i < n; ++i) {
    cin >> x;
    c.push_back(x);
  }
  for (int i = 0; i < n; ++i) {
    cin >> x;
    k.push_back(x);
    for (int j = 0; j < i; ++j) {
      long long w = abs(v[i].first - v[j].first);
      w += abs(v[i].second - v[j].second);
      w = w * (k[i] + k[j]);
      e[i].push_back({w, j});
      e[j].push_back({w, i});
    }
  }
  long long yen = 0;
  set<tuple<long long, int, int>> q;
  for (int i = 0; i < n; ++i) q.insert({c[i], i, -1});
  while (!q.empty()) {
    long long aa = get<0>(*q.begin());
    int bb = get<1>(*q.begin());
    int cc = get<2>(*q.begin());
    q.erase(q.begin());
    if (X[bb]) continue;
    yen += aa;
    X[bb] = 1;
    if (cc != -1)
      cm.push_back({bb, cc});
    else
      eb.push_back(bb);
    for (auto u : e[bb])
      if (c[u.second] > u.first) {
        q.insert({u.first, u.second, bb});
        c[u.second] = u.first;
      }
  }
  cout << yen << "\n";
  cout << eb.size() << "\n";
  for (auto &zz : eb) cout << zz + 1 << " ";
  cout << "\n";
  cout << cm.size() << "\n";
  for (auto &zz : cm) cout << zz.first + 1 << " " << zz.second + 1 << "\n";
  return 0;
}
