#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 5;
int n, m;
struct Element {
  int p, s, b;
  int inc, pref;
  int id, l, r, x;
} a[maxn * 2];
int vec[maxn * 3], sz;
int id[maxn * 2];
int c[maxn * 3];
int ret[maxn];
bool cmp1(const Element &a, const Element &b) {
  int x = (a.x ? a.inc + a.pref : a.p + a.b);
  int y = (b.x ? b.inc + b.pref : b.p + b.b);
  if (x != y) return x < y;
  return a.x < b.x;
}
bool cmp2(const Element &a, const Element &b) {
  int x = (a.x ? a.inc - a.pref : a.p - a.b);
  int y = (b.x ? b.inc - b.pref : b.p - b.b);
  if (x != y) return x < y;
  return a.x < b.x;
}
bool cmp_id1(int i, int j) {
  int x = (a[i].x ? a[i].pref : a[i].b);
  int y = (a[j].x ? a[j].pref : a[j].b);
  if (x != y) return x > y;
  return a[i].x < a[j].x;
}
bool cmp_id2(int i, int j) {
  int x = (a[i].x ? a[i].pref : a[i].b);
  int y = (a[j].x ? a[j].pref : a[j].b);
  if (x != y) return x < y;
  return a[i].x > a[j].x;
}
void update(int l, int r, int d) {
  for (int i = l; i <= sz; i += i & -i) c[i] += d;
  for (int i = r + 1; i <= sz; i += i & -i) c[i] -= d;
}
int query(int i) {
  int ret = 0;
  for (; i; i -= i & -i) ret += c[i];
  return ret;
}
void cdq1(int l, int r) {
  if (l == r) return;
  int mid = (l + r) / 2;
  cdq1(l, mid);
  for (int i = l; i <= r; ++i) id[i] = i;
  sort(id + l, id + r + 1, cmp_id1);
  for (int j = l; j <= r; ++j) {
    int i = id[j];
    if (i <= mid && !a[i].x) {
      update(a[i].l, a[i].r, +1);
    }
    if (i > mid && a[i].x) {
      ret[a[i].id - n] += query(a[i].x);
    }
  }
  for (int j = l; j <= r; ++j) {
    int i = id[j];
    if (i <= mid && !a[i].x) {
      update(a[i].l, a[i].r, -1);
    }
  }
  cdq1(mid + 1, r);
}
void cdq2(int l, int r) {
  if (l == r) return;
  int mid = (l + r) / 2;
  cdq2(l, mid);
  for (int i = l; i <= r; ++i) id[i] = i;
  sort(id + l, id + r + 1, cmp_id2);
  for (int j = l; j <= r; ++j) {
    int i = id[j];
    if (i <= mid && !a[i].x) {
      update(a[i].l, a[i].r, +1);
    }
    if (i > mid && a[i].x) {
      ret[a[i].id - n] += query(a[i].x);
    }
  }
  for (int j = l; j <= r; ++j) {
    int i = id[j];
    if (i <= mid && !a[i].x) update(a[i].l, a[i].r, -1);
  }
  cdq2(mid + 1, r);
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i].p);
    vec[sz++] = a[i].p;
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i].s);
    vec[sz++] = a[i].s;
  }
  for (int i = 0; i < n; ++i) scanf("%d", &a[i].b);
  for (int i = n; i < n + m; ++i) {
    scanf("%d", &a[i].inc);
    vec[sz++] = a[i].inc;
  }
  for (int i = n; i < n + m; ++i) scanf("%d", &a[i].pref);
  sort(vec, vec + sz);
  sz = unique(vec, vec + sz) - vec;
  for (int i = 0; i < n; ++i) {
    a[i].l = lower_bound(vec, vec + sz, a[i].p) - vec + 1;
    a[i].r = lower_bound(vec, vec + sz, a[i].s) - vec + 1;
  }
  for (int i = n; i < n + m; ++i) {
    a[i].x = lower_bound(vec, vec + sz, a[i].inc) - vec + 1;
  }
  for (int i = 0; i < n + m; ++i) a[i].id = i;
  sort(a, a + n + m, cmp1);
  cdq1(0, n + m - 1);
  sort(a, a + n + m, cmp2);
  cdq2(0, n + m - 1);
  for (int i = 0; i < m; ++i) printf("%d%c", ret[i], " \n"[i == m - 1]);
  return 0;
}
