#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<long long> x(n), y(n), c(n), k(n), w(n);
  vector<char> v(n, false);
  set<pair<long long, int>> s;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (int i = 0; i < n; i++) {
    cin >> c[i];
    w[i] = i;
    s.insert({c[i], i});
  }
  for (int i = 0; i < n; i++) cin >> k[i];
  long long res = 0;
  for (int a = 0; a < n; a++) {
    int i = s.begin()->second;
    s.erase(s.begin());
    res += c[i];
    v[i] = true;
    for (int j = 0; j < n; j++) {
      if (v[j]) continue;
      long long dc = (k[i] + k[j]) * (abs(x[i] - x[j]) + abs(y[i] - y[j]));
      if (dc < c[j]) {
        w[j] = i;
        s.erase({c[j], j});
        c[j] = dc;
        s.insert({c[j], j});
      }
    }
  }
  cout << res << "\n";
  vector<int> sts;
  vector<pair<int, int>> cns;
  for (int i = 0; i < n; i++) {
    if (w[i] == i)
      sts.push_back(i + 1);
    else
      cns.push_back({i + 1, w[i] + 1});
  }
  cout << sts.size() << "\n";
  for (auto s : sts) cout << s << " ";
  cout << "\n";
  cout << cns.size() << "\n";
  for (auto c : cns) cout << c.first << " " << c.second << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
