#include <bits/stdc++.h>
using namespace std;
const long long N = 2000;
long long n;
long long x[N + 1], y[N + 1];
long long a[N + 1], b[N + 1];
vector<pair<long long, pair<long long, long long> > > eg;
struct ufset {
  long long fa[N + 2];
  void init() { memset(fa, 0, sizeof(fa)); }
  long long root(long long x) { return fa[x] ? fa[x] = root(fa[x]) : x; }
  void merge(long long x, long long y) { fa[root(x)] = root(y); }
  bool same(long long x, long long y) { return root(x) == root(y); }
} ufs;
signed main() {
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (long long i = 1; i <= n; i++) cin >> a[i];
  for (long long i = 1; i <= n; i++) cin >> b[i];
  for (long long i = 1; i <= n; i++)
    for (long long j = i + 1; j <= n; j++) {
      long long len = (b[i] + b[j]) * (abs(x[i] - x[j]) + abs(y[i] - y[j]));
      eg.push_back(make_pair(len, make_pair(i, j)));
    }
  for (long long i = 1; i <= n; i++)
    eg.push_back(make_pair(a[i], make_pair(i, n + 1)));
  sort(eg.begin(), eg.end());
  long long ans = 0;
  vector<long long> v1;
  vector<pair<long long, long long> > v2;
  for (long long i = 0; i < eg.size(); i++)
    if (!ufs.same(eg[i].second.first, eg[i].second.second)) {
      ans += eg[i].first;
      if (eg[i].second.second == n + 1)
        v1.push_back(eg[i].second.first);
      else
        v2.push_back(eg[i].second);
      ufs.merge(eg[i].second.first, eg[i].second.second);
    }
  cout << ans << "\n" << v1.size() << "\n";
  for (long long i = 0; i < v1.size(); i++) cout << v1[i] << " ";
  puts("");
  cout << v2.size() << "\n";
  for (long long i = 0; i < v2.size(); i++)
    cout << v2[i].first << " " << v2[i].second << "\n";
  return 0;
}
