#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, long long int n) {
  long long int res = 1;
  while (n > 0) {
    if (n % 2 == 1) {
      res = res * x;
    }
    x = x * x;
    n = n / 2;
  }
  return res;
}
long long int powm(long long int a, long long int b) {
  long long int res = 1;
  a %= 1000000007;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % 1000000007;
    a = a * a % 1000000007;
  }
  return res;
}
const int N = 20000;
int par[N];
int sz[N];
void init(int n) {
  for (int i = 0; i <= n; i++) {
    par[i] = i;
    sz[i] = 1;
  }
}
int getpar(int v) {
  if (v == par[v]) {
    return v;
  }
  return par[v] = getpar(par[v]);
}
void unite(int a, int b) {
  a = getpar(a);
  b = getpar(b);
  if (a != b) {
    if (sz[a] < sz[b]) {
      swap(a, b);
    }
    par[b] = a;
    sz[a] += sz[b];
    sz[b] = 0;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n, i, j;
  cin >> n;
  long long int x[n + 1], y[n + 1];
  for (i = 1; i <= n; i++) cin >> x[i] >> y[i];
  long long int c[n + 1], k[n + 1];
  for (i = 1; i <= n; i++) cin >> c[i];
  for (i = 1; i <= n; i++) cin >> k[i];
  vector<pair<long long int, pair<long long int, long long int> > > v;
  for (i = 1; i <= n; i++) {
    v.push_back({c[i], {0, i}});
  }
  for (i = 1; i <= n; i++) {
    for (j = i + 1; j <= n; j++) {
      long long int cost = abs(x[i] - x[j]) + abs(y[i] - y[j]);
      cost *= (k[i] + k[j]);
      v.push_back({cost, {i, j}});
    }
  }
  sort(v.begin(), v.end());
  init(n);
  vector<int> ans1;
  long long int ans = 0;
  vector<pair<long long int, long long int> > ans2;
  for (i = 0; i < v.size(); i++) {
    if (getpar(v[i].second.first) == getpar(v[i].second.second)) {
      continue;
    } else {
      ans = ans + v[i].first;
      if (v[i].second.first == 0) {
        ans1.push_back(v[i].second.second);
      } else {
        ans2.push_back(v[i].second);
      }
      unite(v[i].second.first, v[i].second.second);
    }
  }
  cout << ans << "\n";
  cout << ans1.size() << "\n";
  for (i = 0; i < ans1.size(); i++) {
    cout << ans1[i] << " ";
  }
  cout << "\n";
  cout << ans2.size() << "\n";
  for (i = 0; i < ans2.size(); i++) {
    cout << ans2[i].first << " " << ans2[i].second << "\n";
  }
}
