#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
map<int, vector<pair<int, int>>> mp;
int n, m, k, p[N], s[N], b[N], inc[N], pref[N], a[N << 2], fen[N << 2][2],
    ans[N];
inline int get_id(int x) { return lower_bound(a, a + k, x) - a; }
inline void add(int p, int id, int x) {
  for (p = k - get_id(p); p; p -= p & -p) fen[p][id] += x;
}
inline int get(int p, int id) {
  int ans = 0;
  for (p = max(k - get_id(p), 1); p <= k; p += p & -p) ans += fen[p][id];
  return ans;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> p[i];
    mp[p[i]].push_back({0, i});
  }
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    mp[s[i]].push_back({2, i});
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    a[k++] = b[i] + s[i];
    a[k++] = b[i] - s[i];
  }
  for (int i = 0; i < m; i++) {
    cin >> inc[i];
    mp[inc[i]].push_back({1, i});
  }
  for (int i = 0; i < m; i++) {
    cin >> pref[i];
    a[k++] = pref[i] + inc[i];
    a[k++] = pref[i] - inc[i];
  }
  sort(a, a + k);
  k = unique(a, a + k) - a;
  for (auto v : mp) {
    sort(v.second.begin(), v.second.end());
    for (auto x : v.second) {
      int id = x.second;
      if (x.first & 1)
        ans[id] = get(pref[id] + inc[id], 0) + get(pref[id] - inc[id], 1);
      else
        add(b[id] + p[id], 0, x.first ? -1 : 1),
            add(b[id] - p[id] + 1, 1, x.first ? 1 : -1);
    }
  }
  for (int i = 0; i < m; i++) cout << ans[i] << ' ';
}
