#include <bits/stdc++.h>
using namespace std;
const int NMAX = 2001;
int c[NMAX];
int k[NMAX];
int x[NMAX], y[NMAX];
long long dist[NMAX];
int pred[NMAX];
long long cost(int i, int j) {
  return (abs((long long)x[i] - (long long)x[j]) +
          abs((long long)y[i] - (long long)y[j])) *
         ((long long)k[i] + (long long)k[j]);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &c[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &k[i]);
  for (int i = 1; i <= n; i++) dist[i] = c[i];
  long long sum = 0;
  vector<int> power;
  vector<pair<int, int> > con;
  for (int i = 0; i < n; i++) {
    int cur = -1;
    for (int j = 1; j <= n; j++)
      if (dist[j] != -1 && (cur == -1 || dist[j] < dist[cur])) cur = j;
    if (dist[cur] == c[cur])
      power.push_back(cur);
    else
      con.push_back({cur, pred[cur]});
    sum += (long long)dist[cur];
    dist[cur] = -1;
    for (int j = 1; j <= n; j++)
      if (dist[j] != -1) {
        long long v = cost(cur, j);
        if (dist[j] > v) {
          dist[j] = v;
          pred[j] = cur;
        }
      }
  }
  printf("%I64d\n", sum);
  printf("%d\n", (int)power.size());
  for (int e : power) printf("%d ", e);
  printf("\n%d\n", (int)con.size());
  for (pair<int, int> p : con) printf("%d %d\n", p.first, p.second);
}
