#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
ll parent[2002], size1[2002];
ll ans, m;
vector<ll> z1;
vector<pair<ll, ll>> z2;
void make_set(ll v) {
  parent[v] = v;
  size1[v] = 1;
}
ll find_set(ll v) {
  if (v == parent[v]) return v;
  return parent[v] = find_set(parent[v]);
}
void union_sets(ll a, ll b, ll c) {
  int flag = 0;
  ll q, w;
  if (a == 0 || b == 0) flag = 1;
  if (flag)
    q = a ^ b;
  else {
    q = a, w = b;
  }
  a = find_set(a);
  b = find_set(b);
  if (a != b) {
    if (size1[a] < size1[b]) swap(a, b);
    parent[b] = a;
    size1[a] += size1[b];
    ans += c;
    m++;
    if (flag)
      z1.push_back(q);
    else
      z2.push_back({q, w});
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ll n, i, j, x, y, z;
  cin >> n;
  ll a[n][2];
  for (i = 0; i < n; i++) {
    cin >> a[i][0] >> a[i][1];
  }
  ll c[n], k[n];
  for (i = 0; i < n; i++) cin >> c[i];
  for (i = 0; i < n; i++) cin >> k[i];
  vector<pair<ll, pair<ll, ll>>> v;
  for (i = 1; i <= n; i++) {
    v.push_back({c[i - 1], {0, i}});
  }
  y = 0;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) {
      if (i == j) continue;
      x = abs(a[i - 1][0] - a[j - 1][0]) + abs(a[i - 1][1] - a[j - 1][1]);
      v.push_back({(k[i - 1] + k[j - 1]) * x, {i, j}});
      y++;
    }
  }
  sort(v.begin(), v.end());
  for (i = 0; i <= n; i++) make_set(i);
  j = y;
  ans = 0;
  m = 0;
  for (i = 0; i <= j; i++) {
    x = v[i].second.first;
    y = v[i].second.second;
    z = v[i].first;
    union_sets(x, y, z);
    if (m == n) break;
  }
  cout << ans << "\n";
  ;
  cout << z1.size() << "\n";
  for (i = 0; i < z1.size(); i++) cout << z1[i] << " ";
  if (z1.size()) cout << "\n";
  cout << z2.size() << "\n";
  for (i = 0; i < z2.size(); i++)
    cout << z2[i].first << " " << z2[i].second << "\n";
}
