#include <bits/stdc++.h>
using namespace std;
int income[100005], price[100005], pref[100005], bea[100005], stan[100005];
int tree2[100005];
vector<pair<int, int> > tree[100005 * 5], ques[100005 * 5];
void update(int node, int st, int en, int l, int r, pair<int, int> ps) {
  if (st > r or en < l) return;
  if (st >= l and en <= r) {
    tree[node].push_back(ps);
    return;
  }
  int mid = (st + en) >> 1;
  update(node * 2, st, mid, l, r, ps);
  update(node * 2 + 1, mid + 1, en, l, r, ps);
}
void update2(int node, int st, int en, int pos, pair<int, int> ps) {
  if (st > pos or en < pos) return;
  ques[node].push_back(ps);
  if (st == en) return;
  int mid = (st + en) >> 1;
  update2(node * 2, st, mid, pos, ps);
  update2(node * 2 + 1, mid + 1, en, pos, ps);
}
int query(int idx) {
  int sum = 0;
  while (idx > 0) {
    sum += tree2[idx];
    idx -= idx & (-idx);
  }
  return sum;
}
void update(int idx, int x, int n) {
  while (idx <= n) {
    tree2[idx] += x;
    idx += idx & (-idx);
  }
}
int ans[100005];
void process() {
  for (int node = 1; node <= 400000; node++) {
    sort(tree[node].begin(), tree[node].end());
    vector<int> vc;
    for (int j = 0; j < tree[node].size(); j++) {
      vc.push_back(tree[node][j].second - tree[node][j].first);
    }
    sort(vc.begin(), vc.end());
    sort(ques[node].begin(), ques[node].end());
    int l = 0, r = 0;
    for (int j = 0; j < ques[node].size(); j++) {
      while (l < tree[node].size() &&
             tree[node][l].first <= ques[node][j].first) {
        int f = tree[node][l].second - tree[node][l].first;
        int pos = upper_bound(vc.begin(), vc.end(), f - 1) - vc.begin();
        update(pos + 1, 1, vc.size());
        l++;
      }
      int g = income[ques[node][j].second] - ques[node][j].first;
      int pos = upper_bound(vc.begin(), vc.end(), g) - vc.begin();
      ans[ques[node][j].second] += query(pos);
    }
    l--;
    while (l >= 0) {
      int f = tree[node][l].second - tree[node][l].first;
      int pos = upper_bound(vc.begin(), vc.end(), f - 1) - vc.begin();
      update(pos + 1, -1, vc.size());
      l--;
    }
    vc.clear();
    for (int j = 0; j < tree[node].size(); j++) {
      vc.push_back(tree[node][j].second + tree[node][j].first);
    }
    sort(vc.begin(), vc.end());
    l = tree[node].size() - 1;
    for (int j = ques[node].size() - 1; j >= 0; j--) {
      while (l >= 0 && tree[node][l].first > ques[node][j].first) {
        int f = tree[node][l].second + tree[node][l].first;
        int pos = upper_bound(vc.begin(), vc.end(), f - 1) - vc.begin();
        update(pos + 1, 1, vc.size());
        l--;
      }
      int g = income[ques[node][j].second] + ques[node][j].first;
      int pos = upper_bound(vc.begin(), vc.end(), g) - vc.begin();
      ans[ques[node][j].second] += query(pos);
    }
    l++;
    while (l < tree[node].size()) {
      int f = tree[node][l].second + tree[node][l].first;
      int pos = upper_bound(vc.begin(), vc.end(), f - 1) - vc.begin();
      update(pos + 1, -1, vc.size());
      l++;
    }
  }
}
vector<pair<int, int> > tp;
int main() {
  int i, j, k, l, m, n;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &price[i]);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &stan[i]);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &bea[i]);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d", &income[i]);
  }
  tp.push_back(make_pair(-1, -1));
  for (int i = 1; i <= m; i++) {
    scanf("%d", &pref[i]);
    tp.push_back(make_pair(income[i], i));
  }
  sort(tp.begin(), tp.end());
  for (int i = 1; i <= n; i++) {
    int pos =
        upper_bound(tp.begin(), tp.end(), make_pair(price[i] - 1, INT_MAX)) -
        tp.begin();
    int pos2 = upper_bound(tp.begin(), tp.end(), make_pair(stan[i], INT_MAX)) -
               tp.begin();
    pos2--;
    if (pos <= pos2) update(1, 1, m, pos, pos2, make_pair(bea[i], price[i]));
  }
  for (int i = 1; i <= m; i++) {
    update2(1, 1, m, i, make_pair(pref[tp[i].second], tp[i].second));
  }
  process();
  for (int i = 1; i <= m; i++) {
    printf("%d ", ans[i]);
  }
}
