#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long powermodm(long long x, long long n, long long M) {
  long long result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % M;
    x = (x * x) % M;
    n = n / 2;
  }
  return result;
}
long long power(long long _a, long long _b) {
  long long _r = 1;
  while (_b) {
    if (_b % 2 == 1) _r = (_r * _a);
    _b /= 2;
    _a = (_a * _a);
  }
  return _r;
}
vector<pair<long long, long long> > v[2001];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long x[n + 1], y[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
  }
  long long min1 = 1e18;
  long long ind;
  long long c[n + 1], k[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> c[i];
    if (min1 > c[i]) {
      min1 = c[i];
      ind = i;
    }
  }
  for (int i = 1; i <= n; i++) {
    cin >> k[i];
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (i != j)
        v[i].push_back(
            {j, (abs(x[i] - x[j]) + abs(y[i] - y[j])) * (k[i] + k[j])});
    }
  }
  vector<long long> g1;
  vector<pair<long long, long long> > g2;
  long long ans = 0;
  bool vis[n + 1];
  memset(vis, false, sizeof vis);
  multiset<pair<long long, pair<long long, long long> > > s;
  s.insert({1e18, {ind, -1}});
  while (!s.empty()) {
    pair<long long, pair<long long, long long> > p = *s.begin();
    s.erase(s.begin());
    long long x = p.second.first;
    long long wei = p.first;
    long long par = p.second.second;
    if (vis[x] == 1) {
      continue;
    }
    ans = ans + min(wei, c[x]);
    if (wei >= c[x]) {
      g1.push_back(x);
    } else {
      g2.push_back({par, x});
    }
    vis[x] = 1;
    for (int i = 0; i < v[x].size(); i++) {
      if (vis[v[x][i].first] == 0) {
        s.insert({min(v[x][i].second, c[v[x][i].first]), {v[x][i].first, x}});
      }
    }
  }
  cout << ans << endl;
  cout << g1.size() << "\n";
  for (int i = 0; i < g1.size(); i++) {
    cout << g1[i] << " ";
  }
  cout << "\n";
  cout << g2.size() << "\n";
  for (int i = 0; i < g2.size(); i++) {
    cout << g2[i].first << " " << g2[i].second << "\n";
  }
  return 0;
}
