#include <bits/stdc++.h>
using namespace std;
priority_queue<pair<long long, pair<long long, long long> > > pq;
long long ck[100005], pos[10000][2], ara[10000], cst[10000];
pair<long long, pair<long long, long long> > pr;
pair<long long, long long> tanu;
queue<long long> ph;
queue<pair<long long, long long> > con;
int main() {
  long long n, m, i, j, k, a, b, c, x, y, z;
  cin >> n;
  for (i = 1; i <= n; i++) {
    scanf("%lld%lld", &pos[i][0], &pos[i][1]);
  }
  for (i = 1; i <= n; i++) {
    scanf("%lld", &ara[i]);
    pq.push(make_pair(-ara[i], make_pair(i, i)));
  }
  for (i = 1; i <= n; i++) {
    scanf("%lld", &cst[i]);
  }
  z = n;
  x = 0;
  y = 0;
  while (!pq.empty() && z > 0) {
    pr = pq.top();
    pq.pop();
    a = pr.second.first;
    if (ck[a]) continue;
    pr.first = -pr.first;
    x += pr.first;
    if (pr.second.first == pr.second.second) {
      ph.push(pr.second.first);
    } else {
      con.push(make_pair(pr.second.first, pr.second.second));
    }
    a = pr.second.first;
    ck[a] = 1;
    z--;
    for (i = 1; i <= n; i++) {
      if (ck[i]) continue;
      b = abs(pos[a][0] - pos[i][0]) + abs(pos[a][1] - pos[i][1]);
      b *= (cst[a] + cst[i]);
      pq.push(make_pair(-b, make_pair(i, a)));
    }
  }
  cout << x << endl;
  cout << ph.size() << endl;
  while (!ph.empty()) {
    a = ph.front();
    printf("%lld ", a);
    ph.pop();
  }
  cout << endl;
  cout << con.size() << endl;
  while (!con.empty()) {
    tanu = con.front();
    con.pop();
    printf("%lld %lld\n", tanu.first, tanu.second);
  }
}
