#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
const long long INF = 0x3f3f3f3f3f3f3f3f;
const long long llinf = (1LL << 62);
const int inf = (1 << 30);
const int nmax = 1e5 + 50;
const long long mod = 1e9 + 7;
using namespace std;
int n, m, i, j, oi, di, sz, p[nmax], s[nmax], b[nmax], insert[nmax], pr[nmax],
    cs[nmax], cinc[nmax], rs[nmax];
vector<pair<int, int> > d, o;
vector<int> vc, vfw[3 * nmax], fw[3 * nmax];
void upb(int i, int v) {
  for (; i >= 1; i -= i & (-i)) vfw[i].push_back(v);
}
void upd(int i, int v) {
  for (; i >= 1; i -= i & (-i)) {
    if (vfw[i].empty()) continue;
    int j = lower_bound(vfw[i].begin(), vfw[i].end(), v) - vfw[i].begin() + 1;
    for (; j < (int)fw[i].size(); j += j & (-j)) fw[i][j]++;
  }
}
int qry(int i, int v) {
  int ans = 0;
  for (; i <= sz; i += i & (-i)) {
    if (vfw[i].empty()) continue;
    int j = upper_bound(vfw[i].begin(), vfw[i].end(), v) - vfw[i].begin();
    for (; j >= 1; j -= j & (-j)) ans += fw[i][j];
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cerr.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (i = 1; i <= n; i++) cin >> p[i];
  for (i = 1; i <= n; i++) cin >> s[i];
  for (i = 1; i <= n; i++) cin >> b[i];
  for (i = 1; i <= m; i++) cin >> insert[i];
  for (i = 1; i <= m; i++) cin >> pr[i];
  for (i = 1; i <= n; i++) {
    d.push_back(make_pair(b[i], i));
    vc.push_back(p[i]);
    vc.push_back(s[i]);
  }
  for (i = 1; i <= m; i++) {
    o.push_back(make_pair(pr[i], i));
    vc.push_back(insert[i]);
  }
  sort(d.begin(), d.end());
  sort(o.begin(), o.end());
  sort(vc.begin(), vc.end());
  vc.resize(unique(vc.begin(), vc.end()) - vc.begin());
  sz = (int)vc.size();
  for (i = 1; i <= n; i++)
    cs[i] = lower_bound(vc.begin(), vc.end(), s[i]) - vc.begin() + 1;
  for (i = 1; i <= m; i++)
    cinc[i] = lower_bound(vc.begin(), vc.end(), insert[i]) - vc.begin() + 1;
  j = n - 1;
  for (i = m - 1; i >= 0; i--) {
    oi = o[i].second;
    for (; j >= 0; j--) {
      di = d[j].second;
      if (b[di] < pr[oi]) break;
      upb(cs[di], p[di] + b[di]);
    }
  }
  for (i = 1; i <= sz; i++) {
    if (vfw[i].empty()) continue;
    sort(vfw[i].begin(), vfw[i].end());
    vfw[i].resize(unique(vfw[i].begin(), vfw[i].end()) - vfw[i].begin());
    fw[i].resize((int)vfw[i].size() + 2, 0);
  }
  j = n - 1;
  for (i = m - 1; i >= 0; i--) {
    oi = o[i].second;
    for (; j >= 0; j--) {
      di = d[j].second;
      if (b[di] < pr[oi]) break;
      upd(cs[di], p[di] + b[di]);
    }
    rs[oi] += qry(cinc[oi], insert[oi] + pr[oi]);
  }
  for (i = 1; i <= sz; i++) {
    vfw[i].clear();
    fw[i].clear();
  }
  j = 0;
  for (i = 0; i < m; i++) {
    oi = o[i].second;
    for (; j < n; j++) {
      di = d[j].second;
      if (b[di] >= pr[oi]) break;
      upb(cs[di], p[di] - b[di]);
    }
  }
  for (i = 1; i <= sz; i++) {
    if (vfw[i].empty()) continue;
    sort(vfw[i].begin(), vfw[i].end());
    vfw[i].resize(unique(vfw[i].begin(), vfw[i].end()) - vfw[i].begin());
    fw[i].resize((int)vfw[i].size() + 2, 0);
  }
  j = 0;
  for (i = 0; i < m; i++) {
    oi = o[i].second;
    for (; j < n; j++) {
      di = d[j].second;
      if (b[di] >= pr[oi]) break;
      upd(cs[di], p[di] - b[di]);
    }
    rs[oi] += qry(cinc[oi], insert[oi] - pr[oi]);
  }
  for (i = 1; i <= m; i++) cout << rs[i] << " ";
  cout << endl;
  return 0;
}
