#include <bits/stdc++.h>
using namespace std;
struct grad {
  long long x, y;
  long long k;
  long long c;
  int ind;
};
int n;
grad a[2005];
bool cmp(grad levo, grad desno) { return levo.c < desno.c; }
long long sol = 0;
bool bio[2005];
vector<int> lit;
vector<int> stanice;
vector<pair<int, int> > grane;
pair<long long, long long> dis[2005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].x >> a[i].y;
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[i].c;
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[i].k;
  }
  for (int i = 1; i <= n; i++) {
    a[i].ind = i;
  }
  sort(a + 1, a + n + 1, cmp);
  for (int i = 1; i <= n; i++) bio[i] = false;
  for (int i = 1; i <= n; i++) {
    dis[i].second = 100000000000000000;
    dis[i].first = -1;
  }
  while (lit.size() < n) {
    long long minn = 100000000000000000;
    int prvi = -1, drugi = -1;
    for (int i = 1; i <= n; i++) {
      if (!bio[i] && dis[i].second < minn) {
        prvi = i;
        drugi = dis[i].first;
        minn = dis[i].second;
      }
    }
    for (int i = 1; i <= n; i++) {
      if (!bio[i]) {
        if (a[i].c < minn) {
          minn = a[i].c;
          prvi = i;
          drugi = -1;
        }
      }
    }
    bio[prvi] = true;
    lit.push_back(prvi);
    sol += minn;
    if (drugi == -1) {
      stanice.push_back(prvi);
    } else {
      grane.push_back({prvi, drugi});
    }
    for (int i = 1; i <= n; i++) {
      if (!bio[i]) {
        long long uk_k = a[i].k + a[prvi].k;
        long long rasss = abs(a[i].x - a[prvi].x) + abs(a[i].y - a[prvi].y);
        if (uk_k * rasss < dis[i].second) {
          dis[i].second = uk_k * rasss;
          dis[i].first = prvi;
        }
      }
    }
  }
  cout << sol << "\n";
  cout << stanice.size() << "\n";
  for (auto tre : stanice) cout << a[tre].ind << " ";
  cout << "\n";
  cout << grane.size() << "\n";
  for (auto tre : grane)
    cout << a[tre.first].ind << " " << a[tre.second].ind << "\n";
  return 0;
}
