#include <bits/stdc++.h>
using namespace std;
const int MAX = 2000 + 9;
long long n, x[MAX], y[MAX], c[MAX], k[MAX], par[MAX];
long long ans;
bool dead[MAX];
vector<int> a;
void Input();
void DSU();
long long dist(int v, int u);
void OutPut();
int main() {
  Input();
  DSU();
  OutPut();
  return 0;
}
void DSU() {
  memset(par, -1, sizeof par);
  for (int t = 0; t < n; t++) {
    int MIN = -1;
    for (int i = 0; i < n; i++) {
      if (dead[i]) continue;
      if (MIN == -1 || c[MIN] > c[i]) MIN = i;
    }
    int v = MIN;
    dead[v] = true;
    ans += c[v];
    for (int i = 0; i < n; i++) {
      if (dead[i]) continue;
      long long val = (k[i] + k[v]) * dist(i, v);
      if (val < c[i]) {
        c[i] = val;
        par[i] = v;
      }
    }
  }
}
long long dist(int v, int u) {
  int val = abs(x[v] - x[u]) + abs(y[v] - y[u]);
  return val;
}
void OutPut() {
  int val = 0;
  vector<int> v;
  cout << ans << endl;
  for (int i = 0; i < n; i++)
    if (par[i] == -1) {
      v.push_back(i + 1);
      val++;
    }
  cout << val << endl;
  for (int i = 0; i < v.size(); i++) cout << v[i] << ' ';
  cout << endl;
  cout << n - val << endl;
  for (int i = 0; i < n; i++)
    if (par[i] != -1) cout << i + 1 << ' ' << par[i] + 1 << endl;
}
void Input() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (int i = 0; i < n; i++) cin >> c[i];
  for (int i = 0; i < n; i++) cin >> k[i];
}
