#include <bits/stdc++.h>
using namespace std;
const int sz = 4002005;
const int N = 2005;
long long n, p[sz], rk[sz], dem, d1, d2, res, w[N], k[N], x[N], y[N];
long long cnt = 0;
pair<long long, pair<long long, long long>> a[sz];
vector<pair<long long, long long>> ans;
pair<long long, long long> ans1[sz];
long long luu[sz];
long long FI(long long u) {
  long long v = p[u];
  while (v != u) {
    u = v;
    v = p[u];
  }
  return u;
}
void Un(long long u, long long v) {
  long long x = FI(u);
  long long y = FI(v);
  if (x == y)
    return;
  else {
    if (rk[x] > rk[y]) p[y] = x;
    if (rk[x] < rk[y]) p[x] = y;
    if (rk[x] == rk[y]) {
      p[y] = x;
      rk[x]++;
      return;
    }
  }
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(0);
  std::cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (int i = 1; i <= n; i++) cin >> w[i];
  for (int i = 1; i <= n; i++) cin >> k[i];
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      a[++cnt].first = (abs(x[i] - x[j]) + abs(y[i] - y[j])) * (k[i] + k[j]);
      a[cnt].second.first = i;
      a[cnt].second.second = j;
    }
  for (long long i = 1; i <= n; i++) {
    a[++cnt].first = w[i];
    a[cnt].second.first = n + 1;
    a[cnt].second.second = i;
  }
  sort(a + 1, a + 1 + cnt);
  for (int i = 1; i <= n; i++) p[i] = i;
  for (int i = 1; i <= n * n + n; i++)
    if (FI(a[i].second.first) != FI(a[i].second.second)) {
      Un(a[i].second.first, a[i].second.second);
      ans.push_back({a[i].second.first, a[i].second.second});
      res += a[i].first;
    }
  cout << res << endl;
  for (int i = 0; i <= ans.size() - 1; i++) {
    if (ans[i].first == n + 1)
      luu[++d1] = ans[i].second;
    else
      ans1[++d2] = {ans[i].first, ans[i].second};
  }
  cout << d1 << endl;
  sort(luu + 1, luu + 1 + d1);
  for (int i = 1; i <= d1; i++) cout << luu[i] << " ";
  cout << endl;
  cout << d2 << endl;
  for (int i = 1; i <= d2; i++)
    cout << ans1[i].first << " " << ans1[i].second << endl;
}
