#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int res = 0;
  bool bo = 0;
  char c;
  while (((c = getchar()) < '0' || c > '9') && c != '-')
    ;
  if (c == '-')
    bo = 1;
  else
    res = c - 48;
  while ((c = getchar()) >= '0' && c <= '9')
    res = (res << 3) + (res << 1) + (c - 48);
  return bo ? ~res + 1 : res;
}
const int N = 1e5 + 5, M = N << 2;
int n, m, p[N], s[N], b[N], inc[N], pref[N], tot, a[M], A[M], B[M], cnt, ans[N];
struct node {
  int tm, x, y, op, id;
} que[M];
inline bool comp(node a, node b) {
  return a.tm < b.tm || (a.tm == b.tm && a.op < b.op);
}
inline int lowbit(int x) { return x & (-x); }
void changeA(int pos, int val) {
  while (pos <= tot) {
    A[pos] += val;
    pos += lowbit(pos);
  }
}
void changeB(int pos, int val) {
  while (pos <= tot) {
    B[pos] += val;
    pos += lowbit(pos);
  }
}
int queryA(int pos) {
  int sum = 0;
  while (pos) {
    sum += A[pos];
    pos -= lowbit(pos);
  }
  return sum;
}
int queryB(int pos) {
  int sum = 0;
  while (pos) {
    sum += B[pos];
    pos -= lowbit(pos);
  }
  return sum;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &p[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &s[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
  for (int i = 1; i <= m; i++) scanf("%d", &inc[i]);
  for (int i = 1; i <= m; i++) scanf("%d", &pref[i]);
  for (int i = 1; i <= n; i++)
    a[++tot] = p[i] + b[i], a[++tot] = b[i] - p[i] + 1;
  for (int i = 1; i <= m; i++)
    a[++tot] = inc[i] + pref[i], a[++tot] = pref[i] - inc[i];
  std::sort(a + 1, a + tot + 1);
  int tt = std::unique(a + 1, a + tot + 1) - a - 1;
  tot = tt;
  for (int i = 1; i <= n; i++) {
    que[++cnt] = (node){p[i], p[i], b[i], 1, 0};
    que[++cnt] = (node){s[i] + 1, p[i], b[i], -1, 0};
  }
  for (int i = 1; i <= m; i++) que[++cnt] = {inc[i], inc[i], pref[i], 2, i};
  sort(que + 1, que + cnt + 1, comp);
  for (int i = 1; i <= cnt; i++)
    if (que[i].op <= 1) {
      changeA(lower_bound(a + 1, a + tot + 1, que[i].x + que[i].y) - a,
              que[i].op);
      changeB(lower_bound(a + 1, a + tot + 1, que[i].y - que[i].x + 1) - a,
              que[i].op);
    } else
      ans[que[i].id] =
          queryA(lower_bound(a + 1, a + tot + 1, que[i].x + que[i].y) - a) -
          queryB(lower_bound(a + 1, a + tot + 1, que[i].y - que[i].x) - a);
  for (int i = 1; i <= m; i++) printf("%d ", ans[i]);
  return puts(""), 0;
}
