#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
struct BIT {
 private:
  vector<long long> bit;
  long long num;

 public:
  BIT(vector<long long> v) {
    num = v.size();
    bit.resize(num);
    for (long long i = (0); i < (num); i++) bit[i] = v[i];
  }
  long long sum(long long i) {
    long long s = 0;
    while (i > 0) {
      s += bit[i];
      i -= i & -i;
    }
    return s;
  }
  void add(long long i, long long x) {
    while (i <= num) {
      bit[i] += x;
      i += i & -i;
    }
  }
};
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, m;
  cin >> n >> m;
  vector<pair<long long, long long> > val;
  vector<long long> bP, bM;
  bP.push_back(-(1LL << 60));
  bM.push_back(-(1LL << 60));
  vector<long long> p(n);
  for (long long i = (0); i < (n); i++) {
    cin >> p[i];
    val.push_back(pair<long long, long long>(p[i], i));
  }
  vector<long long> s(n);
  for (long long i = (0); i < (n); i++) {
    cin >> s[i];
    val.push_back(pair<long long, long long>(s[i], i + 200000));
  }
  vector<long long> b(n);
  for (long long i = (0); i < (n); i++) {
    cin >> b[i];
    bP.push_back(b[i] + p[i]);
    bM.push_back(p[i] - b[i]);
  }
  vector<long long> inc(m);
  for (long long i = (0); i < (m); i++) {
    cin >> inc[i];
    val.push_back(pair<long long, long long>(inc[i], i + 100000));
  }
  vector<long long> pref(m);
  for (long long i = (0); i < (m); i++) {
    cin >> pref[i];
    bP.push_back(inc[i] + pref[i]);
    bM.push_back(inc[i] - pref[i]);
  }
  sort(val.begin(), val.end());
  sort(bP.begin(), bP.end());
  sort(bM.begin(), bM.end());
  BIT bitP(vector<long long>(bP.size(), 0)),
      bitM(vector<long long>(bM.size(), 0));
  vector<long long> ans(m, 0);
  long long cnt = 0;
  for (long long i = (0); i < (val.size()); i++) {
    long long id = val[i].second;
    if (id < 100000) {
      cnt++;
      long long tmp =
          lower_bound(bP.begin(), bP.end(), b[id] + p[id]) - bP.begin();
      bitP.add(tmp, 1);
      tmp = lower_bound(bM.begin(), bM.end(), p[id] - b[id]) - bM.begin();
      bitM.add(tmp, 1);
    } else if (id < 200000) {
      id -= 100000;
      ans[id] -= cnt;
      long long tmp =
          lower_bound(bP.begin(), bP.end(), inc[id] + pref[id]) - bP.begin();
      ans[id] += bitP.sum(tmp);
      tmp = lower_bound(bM.begin(), bM.end(), inc[id] - pref[id]) - bM.begin();
      ans[id] += bitM.sum(tmp);
    } else {
      id -= 200000;
      cnt--;
      long long tmp =
          lower_bound(bP.begin(), bP.end(), b[id] + p[id]) - bP.begin();
      bitP.add(tmp, -1);
      tmp = lower_bound(bM.begin(), bM.end(), p[id] - b[id]) - bM.begin();
      bitM.add(tmp, -1);
    }
  }
  for (long long i = (0); i < (m); i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
