#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int gcd(int n, int m) { return m == 0 ? n : gcd(m, n % m); }
int f[2006];
int find(int x) {
  if (x == f[x])
    return x;
  else {
    f[x] = find(f[x]);
    return f[x];
  }
}
struct E {
  int x, y;
  long long val;
} ed2[2006], ed[3000006];
bool cmp(E aa, E bb) { return aa.val < bb.val; }
long long c[2006], k[2006];
vector<int> p1;
vector<pair<int, int> > p2;
int main() {
  int n, cnt = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> ed2[i].x >> ed2[i].y;
  }
  f[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> c[i];
    f[i] = 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++) {
      ed[cnt].x = i;
      ed[cnt].y = j;
      ed[cnt].val =
          (k[i] + k[j]) * (abs(ed2[i].x - ed2[j].x) + abs(ed2[i].y - ed2[j].y));
      cnt++;
    }
  }
  for (int i = 1; i <= n; i++) {
    ed[cnt].x = 0;
    ed[cnt].y = i;
    ed[cnt].val = c[i];
    cnt++;
  }
  sort(ed, ed + cnt, cmp);
  long long ans = 0;
  for (int i = 0; i < cnt; i++) {
    int x = find(ed[i].x);
    int y = find(ed[i].y);
    if (x != y) {
      f[x] = y;
      ans += ed[i].val;
      if (ed[i].x == 0 || ed[i].y == 0) {
        p1.push_back(ed[i].x + ed[i].y);
      } else
        p2.push_back(make_pair(ed[i].x, ed[i].y));
    }
  }
  cout << ans << endl;
  int sz = p1.size();
  cout << sz << endl;
  for (int i = 0; i < sz; i++) {
    printf("%d%c", p1[i], " \n"[i == sz - 1]);
  }
  sz = p2.size();
  cout << sz << endl;
  for (int i = 0; i < sz; i++) {
    printf("%d %d\n", p2[i].first, p2[i].second);
  }
  return 0;
}
